This topic is now archived and is closed to further replies.

MSVC++ linking oddities

This topic is 5627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am writing some Direct3D visualisation stuff with a linear algebra library called Lapack which I''ve used a lot on *nix systems. On linking I get an error about a bunch of multiply defined symbols which appear in both msvcrt.lib and all the libc libraries. The compiler suggests using the /NODEFAULTLIB:msvcrt option, however the linker then complains about missing symbols like _fseek, _fscanf and a bunch of other standard looking things. Does anyone know what the hell is happening here? I''m using VS C++ .NET thanks

Share this post

Link to post
Share on other sites
you need to link _one_ crt library to resolve them. probably msvc is set up to use msvcrt.lib, and you''re telling it to not use it, so it ends up without a crt.

Come to #directxdev IRC channel on AfterNET

Share this post

Link to post
Share on other sites
Do this.

Go to "Project->Settings" in the menu.

Click on the "C/C++" tab.

Select the "Code Generation" category.

Make sure all your project files are selected on the left side (if you are using multiple projects)

Under "Uswe run-time library:" select the "Multi-threaded" option for release builds and "Debug Multi-threaded" for debug builds.

If this does not solve that problem, trying the ingle-threaded option. Depends on what the library you are using was compiled with.

Stephen Manchester
Senior Technical Lead
Virtual Media Vision, Inc.
(310) 930-7349

Share this post

Link to post
Share on other sites