Lee Wilson | 16 Apr 02:19

C++ Linker Warnings

Hi,

 

I have been trying to link to theora static libs I built with VC++ 2005 from libtheora-1.0beta2 and libogg-1.1.3. I get a couple of link warnings, the most significant is:

 

LINK : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library

 

I read up about libcmt.lib and found it is a statically linked library that supports multithreaded programs. It is linked to by default for multithreaded (MT[d]). I am actually using Multithreaded DLL (MD[d]) but by including <stream> in my program the libcmt.lib is automatically linked to. I also read that you cannot mix calls to the old iostream library and new C++ Library.

 

So I assume theora uses old iostream library, is that correct?

 

Has anyone else had this problem?

 

Is there a solution? Note I am using a proprietary game engine, and am not in a position to change it to use old style iostream.

                                                                                                                                                                                          

Thanks.

 

 Lee

 


No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.23.0/1379 - Release Date: 15/04/2008 6:10 PM

_______________________________________________
theora mailing list
theora <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora
Marco Era | 16 Apr 09:29

Re: C++ Linker Warnings

Lee Wilson ha scritto:


I have been trying to link to theora static libs I built with VC++ 2005 from libtheora-1.0beta2 and libogg-1.1.3. I get a couple of link warnings, the most significant is:

 

LINK : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library

Just open libtheora project and change the c library option from libcmt to msvcrt; this can be done from menu project > properties > configuration properties > C/C++ > code generation > runtime library.

Then build the libtheora project again and link your program to the result libraries.

Regards.
Marco Era


_______________________________________________
theora mailing list
theora <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora

Gmane