IPP + Linker problems

IPP + Linker problems

I made sure to invest a great deal of time to find a solution for this errors before i post here but i had no direct luck in finding one.

1>Link:
1>  xilink: executing 'link'
1>libcmt.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(fwrite.obj) : error LNK2005: _fwrite already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(_wctype.obj) : error LNK2005: _iswdigit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(_wctype.obj) : error LNK2005: _iswspace already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(_file.obj) : error LNK2005: __lock_file already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(_file.obj) : error LNK2005: __unlock_file already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj)
1>libcmt.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR100.dll)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library

It appears to be a mixing problem of /MT and /MD compiled files. But there are no errors nor warnings when i build the same project with the Visual Studio compiler/linker. I triplechecked all my libraries and confirmed they are all correctly build.

I now suspect IPP to be the root of this problem.
Even tho i do not use IPP myself the linker insists in linking ipps_l.lib, ippvm_l.lib and ippcore.lib to my files.
The first problem was that the *_l.lib versions weren't even included in Parallel Studio 2011 beta.
I fixed this by installing IPP 7.0 beta. But when the linker finally gets his 3 lib files he is spitting out those errors and fails building the executable.

Some information on my setup:
Windows 7 x64
Visual Studio 2010
Parallel Studio 2011 beta
IPP 7.0 beta
Intel Core 2 Quad

Some help to solve this issue is appreciated.

Best regards
Viktor

8 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Quoting vrennert

Even tho i do not use IPP myself the linker insists in linking ipps_l.lib, ippvm_l.lib and ippcore.lib to my files.
The first problem was that the *_l.lib versions weren't even included in Parallel Studio 2011 beta.

I'm not familiar with the exact combination of versions, but it seems a likely reason for unintended invocation of IPP is that you may have turned on the ICC "optimized header" selection.
Hidden in the agreements for Intel beta tests often is a stipulation not to discuss those products on the forums; this might be suitable for an issue submission on premier.intel.com.

Sorry Tim,

it is not my intention to violate the terms of any beta. I trust that this thread is being removed or censored if it does violate those agreements.

In the meantime i luckily stumbled upon the solution.
The inclusion of libirc.lib fixed it all for me. Still do not know why the Intel compiler didn't complain about it.
It was after i reverted back to VC100 that the MS compiler told me what he needed to finish the build. After that it also compiled with ICC.

Quoting tim18Hidden in the agreements for Intel beta tests often is a stipulation not to discuss those products on the forums; this might be suitable for an issue submission on premier.intel.com.

This is actually the Parallel Studio *Beta* forum, so discussion is encouraged.

Hello Viktor!

" I now suspect IPP to be the root of this problem.

Even tho i do not use IPP myself the linker insists in linking ipps_l.lib, ippvm_l.lib and ippcore.lib to my files. "

Do you use any options for IPP in your project settings?

/Qipp[:]
link some or all of the Intel Integrated Performance Primitives
(Intel IPP) libraries and bring in the associated headers

Pavel

Hi Pavel,

like i said i resolved the problem by adding libirc.lib to the linker options.
It think it was a hidden dependency from an external library.

Regards
Viktor

Sorry, but it's cross posted on more than one forum. I wasn't aware of that possibility, so please excuse my comment.

Actually i started this post in the compiler forum but it must have been moved.
Thanks to anyone who tried to help. I really appreciate it.

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!