[Botan-devel] Tons of linker errors with MFC...
Helms, Jim
jhelms at drti.com
Fri Dec 7 09:54:05 EST 2007
Re-built the library with the /MDd flag and it works like a charm. Many
thanks!
--Jim
-----Original Message-----
From: botan-devel-bounces at randombit.net
[mailto:botan-devel-bounces at randombit.net] On Behalf Of Joel Low
Sent: Thursday, December 06, 2007 6:43 PM
To: 'Botan development list'
Subject: RE: [Botan-devel] Tons of linker errors with MFC...
Hello,
Usually, you'd use /MD for release, /MDd for debug. I'm working with
Jack to
get a DLL build of Botan as well as see a few improvements to the build
system for VS, hopefully this will be gone eventually.
Regards,
Joel
> -----Original Message-----
> From: botan-devel-bounces at randombit.net [mailto:botan-devel-
> bounces at randombit.net] On Behalf Of Jack Lloyd
> Sent: Friday, 7 December, 2007 4:18 AM
> To: Botan development list
> Subject: Re: [Botan-devel] Tons of linker errors with MFC...
>
> On Thu, Dec 06, 2007 at 02:47:17PM -0500, Helms, Jim wrote:
> > Hi,
> >
> >
> >
> > I'm working with Botan in an MFC application under VC 7.1 and am
> getting
> > tons of linker errors. I wrote a separate console application with
> the
> > same build of Botan and it worked fine. Are there conflicts between
> > Botan and MFC? Here are the errors:
> >
> >
> >
> > KeyFileGenerator4000 error LNK2005: "public: __thiscall
> > std::basic_string<char,struct std::char_traits<char>,class
> > std::allocator<char> >::~basic_string<char,struct
> > std::char_traits<char>,class std::allocator<char> >(void)"
> >
>
(??1?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ
> )
> > already defined in libbotan.lib(pipe.obj)
> [...]
> > KeyFileGenerator4000 warning LNK4098: defaultlib 'msvcrtd.lib'
> conflicts
> > with use of other libs; use /NODEFAULTLIB:library
> >
> > KeyFileGenerator4000 warning LNK4098: defaultlib 'LIBC' conflicts
> with
> > use of other libs; use /NODEFAULTLIB:library
>
> There is not (to my knowledge!) any intrinsic incompatability between
> Botan and another other library. What this looks like to me (and I'm
> not really a Windows programmer at all, but this looks familiar) is
> that the library (libbotan.lib) was compiled against a different C
> runtime than everything else. IIRC, Windows has four (thread-safe vs
> not, debug vs not), and everything in a program has to be compiled
> against the same library.
>
> MSDN has information about the various flags to cl.exe that affect
> this:
> http://msdn2.microsoft.com/en-us/library/2kzt1wy3(VS.80).aspx
>
> Probably what you want to do is figure out which C library MFC wants
> to link against in your project, and rebuild Botan with the
> appropriate flag so it also uses that C library.
>
> -Jack
>
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel
_______________________________________________
botan-devel mailing list
botan-devel at randombit.net
http://www.randombit.net/mailman/listinfo/botan-devel
More information about the botan-devel
mailing list