unresolved external symbol _sinf/_cosf referenced in function...

unresolved external symbol _sinf/_cosf referenced in function...

I have just installed the Beta version of Intel Parallel Studio 2011 followed by rebuilding the whole solution in Release mode of the project I am working on. To my surprise the new version refuses to link the executable due to an unresolved external to _sinf and _cosf. Rebuilding in Debug mode links without any problems.

It may be worth noting that I have set the "Enable Enhanced Instruction Set" option to "No enhanced instruction sets (/arch:IA32)" in Release mode because some clients were unable to run the program without it (they have old AMD CPUs). However, the error does not seem to be related to it (no reference to sse* functions).

What could be causing this problem and how to solve it?

Thanks.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello,
Those symbols are defined in the libm.lib "C:\Program Files\Intel\Parallel Studio 2011\Composer\compiler\lib\ia32".

Make sure you are not using "/Zl omit default library name in .OBJ" option.

I tried a simple test, it doesn't show the issue. please provide a testcase or code snipet and the compile/link options.

thanks,
Jennifer

Hi,

The /Zl option is not being used, yet it fails to link.

Adding libm.lib to the linker solves this issue. I would not mind leaving that library listed in there, as long as it does not make use of any SSE* instructions.

I have attached a testcase that can reproduce the issue.

Thanks.

Attachments: 

AttachmentSize
Download sinf_cosf.zip6.97 KB

Ok. I see the problem now.

It's because of the link option "/NODEFAULTLIB:"libmmd.lib"" under project property->Linker->Input->Ignore Specific Library: libmmd.lib

If you remove it, it should link ok.

Jennifer

I can confirm that removing that from the Linker options fixes the issue. If I recall correctly I added that library due to a sugestion found in these forums to solve the issue of the produced binary not being runnable on old AMD CPUs.

Thanks.

Leave a Comment

Please sign in to add a comment. Not a member? Join today