469,574 Members | 1,643 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,574 developers. It's quick & easy.

Linker errors when including a static library

TGF
Hello,

I am creating a console app. I try to link a static library by
including it in the Linker-Input-Additional Dependencies field under the
Project properties. Then I specify the path to the library in
Linker-General-Addition Library Directories field under the Project options.
The first question I have is....is this the correct way to include a static
library. If not, then what is the correct way to do it (I need to make .NET
Windows Form applications, so I also need to know how to do it for that as
well). After doing this, I attempt to build and run my console app but the
following linker errors occur (have include the /FORCE switch to force it to
run)....

LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE'
specification
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: _sprintf already defined in
LIBCMTD.lib(sprintf.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: __CrtDbgReport already defined
in LIBCMTD.lib(dbgrpt.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: __resetstkoflw already defined
in LIBCMTD.lib(resetstk.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: _malloc already defined in
LIBCMTD.lib(dbgheap.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: _free already defined in
LIBCMTD.lib(dbgheap.obj); second definition ignored
msvcrtd.lib(ti_inst.obj) : warning LNK4006: "private: __thiscall
type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z)
already defined in LIBCMTD.lib(typinfo.obj); second definition ignored
msvcrtd.lib(ti_inst.obj) : warning LNK4006: "private: class type_info &
__thiscall type_info::operator=(class type_info const &)"
(??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj);
second definition ignored
LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other
libs; use /NODEFAULTLIB:library
Debug/cptest.exe : warning LNK4088: image being generated due to /FORCE
option; image may not run

....Does anyone know what could be causing these errors? I tried mixing and
shuffling #include directives, but I still get the same problems. Any help
would be appreciated.
-T Bone

Jul 21 '05 #1
0 1542

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by TGF | last post: by
2 posts views Thread by Joske | last post: by
2 posts views Thread by Robbie Hatley | last post: by
2 posts views Thread by Oneironaut | last post: by
2 posts views Thread by Markus Dehmann | last post: by
2 posts views Thread by NvrBst | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.