Results 1 to 5 of 5

Thread: Help! linking error

  1. #1

    Exclamation Help! linking error

    I have compiled the libraries and included them.

    But I make a test like below
    Linking errors occur... =[

    #include <ClanLib/core.h>
    #include <ClanLib/application.h>

    class MyClanLibApplication : public CL_ClanApplication
    {
    public:
    virtual int main(int argc, char **argv)
    {
    CL_SetupCore setup_init;

    // game code here

    return 0;
    }
    } app;

    Linking...
    LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(_ctype.obj) : error LNK2005: _isspace already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter_noinfo already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(trnsctrl.obj) : error LNK2005: ___CxxFrameHandler3 already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(typinfo.obj) : error LNK2005: "public: void __thiscall type_info::_type_info_dtor_internal_method(void)" (?_type_info_dtor_internal_method@type_info@@QAEXX Z) already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(typinfo.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in MSVCRT.lib(ti_inst.obj)
    LIBCMT.lib(typinfo.obj) : error LNK2005: "private: class type_info & __thiscall type_info:perator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in MSVCRT.lib(ti_inst.obj)
    LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(exsup.obj) : error LNK2005: __except_list already defined in MSVCRT.lib(dllsupp.obj)
    LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
    LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
    LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
    LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
    LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR80.dll)
    LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
    LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
    LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

    Thank you.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    It looks like you're not compiling the Clanlib libs with the same settings as the ClanApp project. (Don't have one as Release and the other one as Static MT Release, use the same setting for both)

    If you setup your own project, you should manually check Project->Settings->C/C++->Code Generatation and verify runtime library is set the same in each project.

    If an external lib can't be recompiled the way you want, (for instance, you don't have the source) you can add a library to ignore in the "Project->Settings->Link->Input->Ignore libraries" field.
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Talking Solved

    I can see the problem.

    Solved.

    Thank you =].

  4. #4

    Default

    HI ,,
    i am also facing the problem.. how did u solve that can u help me out?

    Thanks
    Shankaran

  5. #5

    Default

    This problem is little bit complicated how did you solve this problem
    ========
    Brook

Similar Threads

  1. Error while Building clanDisplay Library
    By thfai2000 in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 12-21-2006, 07:21 PM
  2. Error at startup
    By in forum Other RTsoft Games
    Replies: 3
    Last Post: 06-28-2006, 09:27 AM
  3. Winsock error 10038: sendmsg()@SendError()
    By Xorith in forum Funeral Quest
    Replies: 3
    Last Post: 10-13-2004, 01:11 PM
  4. Customized error message
    By File Sponge in forum Funeral Quest
    Replies: 2
    Last Post: 08-13-2004, 12:33 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •