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