Community
cancel
Showing results for 
Search instead for 
Did you mean: 
warp69
Beginner
45 Views

Link issue

We use a copy protection system which rely on code injection at compile time - only MSVS and GCC are supported, so we use the Intel compiler for some of the performance heavy functions - we get the following link errors with the 64bit builds (no problem with 32bit) :

error LNK2001: unresolved external symbol _intel_fast_memset

We have added the \\Intel\\Composer XE 2011 SP1\\compiler\\lib\\intel64 directory to the linker.

There'sprobably a simple solution, but right now we can't resolve it. Any ideas?
0 Kudos
6 Replies
TimP
Black Belt
45 Views

As you want performance, you probably wouldn't want to stop ICL from using this function. If you used ICL in place of CL for the link, the necessary version of libirc?.lib would be included implicitly in library dependencies; otherwise you would add it explicitly.
SKost
Valued Contributor II
45 Views

Quoting warp69
...
error LNK2001: unresolved external symbol _intel_fast_memset

We have added the \Intel\Composer XE 2011 SP1\compiler\lib\intel64 directory to the linker.

There'sprobably a simple solution, but right now we can't resolve it. Any ideas?


Did you try to add a 'libiomp5m*.lib'library? You need to look for a 64-bit corresponding version.

Take a look at a description for 'LNK2001' error on MSDN.Shortly, this is what it says:
...
Code references something (such as a function, variable, or label) that the linker can't find in the libraries and object files.
...

JenniferJ
Moderator
45 Views

"_intel_fast_memset" is in "libirc.lib". did you use /Zl during compilation? otherwise it's not required to add it explicitely at link time.

Try to add it to the linker explicitely to see if it fixes the issue.

Jennifer
SKost
Valued Contributor II
45 Views

"_intel_fast_memset" is in "libirc.lib"...

I did a quick check and I can see that the function is in many Intel libraries. Just for information here is a complete list:

[cpp]libbfp754.lib libchkpwrap.lib libchkpwrapmd.lib libiomp5mt.lib Not applicable in 'warp69' case. Sorry, I was wrong when suggested it libiompprof5mt.lib libirc.lib Applicable in 'warp69' case libircmt.lib libmatmul.lib[/cpp]Best regards,
Sergey
warp69
Beginner
45 Views

Thank you.

I added the libircmt.lib to the 64bit build settings and it works of course - /ZI was added to the project.

Some people have experienced unexpected results or crashes with the code and after a lot of investigation - In every single case, they used AMD CPU's (Phenom II 965 etc.). Those that have Intel CPU's doesn't have a single issue. Itried the Microsoft compiler for the critical parts for testing and all the issues went away.

Any hintsfor any settings that might increase the compatibilityfor AMD CPU's?

Thanks in advance.

Martin

TimP
Black Belt
45 Views

Quoting warp69

Any hintsfor any settings that might increase the compatibilityfor AMD CPU's?

If you're launching off into a new subject, it would be better to read past posts on that subject and start a new thread if appropriate, giving some evidence that you looked at those posts and the docs, and of what kind of solution you want.
I doubt if any architecture settings more aggressive than /arch:SSE3 /Qimf-arch-consistency:true have been tested on AMD CPUs, as other options attempt to recognize and make use of characteristics of specific Intel CPU architectures.
I can only guess that you mean improving compatibility compared with default options. In that case, depending on the requirements of your source code, you would consider /fp:source as well as /Qimf-arch-consistency:true