Linking Error in Visual Studio 2008

Mark Mruss <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hi Everyone,

I'm sorry if this has already been answered, I looked for a similar
issue but I couldn't find it.

I am compiling luabind using bjam and trying to work with
libluabind.lib and libluabindd.lib.

I'm getting the following type of linking errors when I try to
statically link with the libs:

1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _memmove_s already
defined in libcmtd.lib(memmove_s.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free already defined in
libcmtd.lib(dbgfree.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall
type_info::type_info(class type_info const &)"
(??0type_info@@AAE@ABV0@@Z) already defined in
libcmtd.lib(typinfo.obj)

Now it seems to me like this is an issue with the fact that my
application is set to "Use MFC in a Static Library" (compiler option
/MT) and when I compile luabind it compiles using the /MD switch
instead. But not matter what I try I can't seem to figure out how to
turn that option on.

If I am on the right track with this does anyone know how to turn on
the /MT option?

I'm I'm not on the right track, does anyone have any clues what I
should be doing?

In case it is relevant I'm using the libs from the following paths:

luabind-0.9\bin\msvc-9.0\debug\link-static\threading-multi\libluabindd.lib
luabind-0.9\bin\msvc-9.0\release\link-static\threading-multi\libluabind.lib

Thanks,

mark.

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.