"unresolved token"

A

Antti Keskinen

Hi !

Try switching the compiler option to /MD instead of /MT. You're apparently
using /MT because the linker is using the multithreaded version of the
Runtime Library (LIBCMT.DLL). Using /MD allows the linker to selectively
pick which function to link with where. For example, with MFC builds, which
allow you to write single- and multi-threaded applications without much care
of what library you use, only the /MD option is allows.

I don't know if this will fix the problem, though. What are the two
additional libraries in the project you mention ?

-Antti Keskinen
 
D

DEFENDER

Hi .I have problem. I have project width 2 libs
When i link my project i have errors some like this :

msvcrt.lib(MSVCR71.dll) : error LNK2005: _memmove already defined i
LIBCMT.lib(memmove.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fflush already defined i
LIBCMT.lib(fflush.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined i
LIBCMT.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _abort already defined i
LIBCMT.lib(abort.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _malloc already defined i
LIBCMT.lib(malloc.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _realloc already defined i
LIBCMT.lib(realloc.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _free already defined i
LIBCMT.lib(free.obj)
E:\robocze VR\polaczzenie\odeirr\Release\odeirr.exe : fatal erro
LNK1169: one or more multiply defined symbols found

When i take and set linker command line /NODEFAULTLIB:libcmt.lib
i have 2 errors like this:

Linking...
LINK : error LNK2020: unresolved token (0A00001D) exception.__ctor
LINK : error LNK2020: unresolved token (0A00001F) exception.__dtor
LINK : fatal error LNK1120: 2 unresolved externals

Can enybody help me width this errors ??
Thanks


-
DEFENDE
 
N

Nikola Dudar [MSFT]

Both your libs and your app have to use one way of linking to CRT. It seems
that your app sets /MD,when one or two libs set /MT. This has to be one
setting for the whole solution.

Thanks,
Nikola

--
Nikola Dudar
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Submitting suggestions and reporting bugs on
http://lab.msdn.microsoft.com/productfeedback/ you're talking directly to
development teams.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top