PC Review


Reply
Thread Tools Rate Thread

Link Errors when trying to include a static library

 
 
TGF
Guest
Posts: n/a
 
      22nd Nov 2003
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:perator=(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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static library contain dynamic library sealo Microsoft VC .NET 4 26th Jun 2007 04:37 AM
using a static library from a static library =?Utf-8?B?TWFubnkgU2lsdmE=?= Microsoft VC .NET 3 13th Jul 2005 12:01 AM
Setting project include directories (VC 7.1): #include <file> vs#include "file" Susan Baker Microsoft VC .NET 2 2nd Jul 2005 02:59 PM
static library in c# library control =?Utf-8?B?bmV3ZXN0IG5ld2JpZQ==?= Microsoft C# .NET 4 13th Apr 2005 06:22 PM
Link errors when including a static library TGF Microsoft Dot NET 0 22nd Nov 2003 09:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:53 AM.