Link Errors when trying to include a static library

Discussion in 'Microsoft Dot NET Framework' started by TGF, Nov 22, 2003.

  1. TGF

    TGF Guest

    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::blush: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
     
    TGF, Nov 22, 2003
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tilfried Weissenberger

    How static is static? - please help

    Tilfried Weissenberger, Jul 19, 2003, in forum: Microsoft Dot NET Framework
    Replies:
    2
    Views:
    689
    Tilfried Weissenberger
    Jul 20, 2003
  2. TGF

    Static library in .NET

    TGF, Nov 21, 2003, in forum: Microsoft Dot NET Framework
    Replies:
    0
    Views:
    174
  3. TGF

    Linker erros using static library

    TGF, Nov 24, 2003, in forum: Microsoft Dot NET Framework
    Replies:
    0
    Views:
    251
  4. Static interfaces? Static method attributes?

    , Feb 1, 2005, in forum: Microsoft Dot NET Framework
    Replies:
    1
    Views:
    315
    Peter Morris [Droopy eyes software]
    Feb 1, 2005
  5. Alejandro

    Static and non static functions

    Alejandro, Jun 5, 2006, in forum: Microsoft Dot NET Framework
    Replies:
    3
    Views:
    169
    Vadym Stetsyak
    Jun 6, 2006
Loading...

Share This Page