freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking errors using Freetype with MFC (MSVC 6.0 SP 3)


From: Antoine Leca
Subject: Re: Linking errors using Freetype with MFC (MSVC 6.0 SP 3)
Date: Tue, 08 Aug 2000 17:53:02 +0200

Bart De Lathouwer wrote:
> 
> I'm trying to use freetype-1.3.1 (and gltt) with MFC using MS VC 6.0 SP3.
> When i compile i get a link error:
> 
> Linking...
> libc.lib(crt0dat.obj) : error LNK2005: _exit already defined in 
> msvcrt.lib(MSVCRT.dll)
> libc.lib(crt0dat.obj) : error LNK2005: __exit already defined in 
> msvcrt.lib(MSVCRT.dll)
> libc.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in 
> msvcrt.lib(MSVCRT.dll)
> libc.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in 
> msvcrt.lib(cinitexe.obj)
> libc.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in 
> msvcrt.lib(cinitexe.obj)
> libc.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in 
> msvcrt.lib(cinitexe.obj)
> libc.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in 
> msvcrt.lib(cinitexe.obj)
> libc.lib(mbctype.obj) : error LNK2005: __setmbcp already defined in 
> msvcrt.lib(MSVCRT.dll)
> LINK : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other 
> libs; use /NODEFAULTLIB:library
> msvcrt.lib(cinitexe.obj) : warning LNK4098: defaultlib "libc.lib" conflicts 
> with use of other libs;
> use /NODEFAULTLIB:library

All these errors/warnings indicate a problem a configuration with your project:
you are at the same time trying to link with the normal (included) library, 
libc,
as well as the DLL, shared, version, MSVCRT.

The example project file which are included with freetype-1.x makes the 
assertion
that they are linked against the default library. I have to study what happens
if someone wants to link against MSVCRT (as I assume MFC is requiring that).
Perhaps a change is required. Stay tuned for the result.


> libc.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

This one is more funny. What are you trying to do?

Remember freetype is a library, so it does not contains any starting
point. It can be compiled as a static library or a DLL, but to make
something functionnal you need to add a real program...

OTOH, it may be a artefact from the (default) including of "libc.lib",
done with the normal compilation of freetype sources (which leads to
the point I talked just above).


Antoine



reply via email to

[Prev in Thread] Current Thread [Next in Thread]