Statische MySQL-Client-Lib



  • Gibt es die Client-Lib von MySQL auch als fertig kompilierte, statische Lib, damit man die DLL nicht mehr einbinden muss?



  • Moin,

    ja, die Möglichkeit besteht :

    libmysql.lib     //Dynamisch
    mysqlclient.lib  //Statisch
    

    Gruß



  • Also irgendwie meckert mein Linker bei mysqlclient.lib 😕 :

    LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt already defined in MSVCRT.lib(MSVCR80.dll)
    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(fflush.obj) : error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(setlocal.obj) : error LNK2005: _setlocale 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: __encoded_null already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer 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(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(calloc.obj) : error LNK2005: _calloc already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already defined in MSVCRT.lib(MSVCR80.dll)
    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(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(winsig.obj) : error LNK2005: _signal 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(tzset.obj) : error LNK2005: __tzset already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(dosmap.obj) : error LNK2005: ___doserrno already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(dosmap.obj) : error LNK2005: __dosmaperr already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(_ctype.obj) : error LNK2005: _isspace already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(_ctype.obj) : error LNK2005: _iscntrl already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(strtol.obj) : error LNK2005: _strtol already defined in MSVCRT.lib(MSVCR80.dll)
    LIBCMT.lib(strtol.obj) : error LNK2005: _strtoul already defined in MSVCRT.lib(MSVCR80.dll)
    

    Kann das daran liegen, dass das ganze ein DLL-Projekt ist?



  • Versuche mal folgendes (Visual C++ 2005 EE)

    Projekt->Eigenschaften->Konfigurationseigenschaften->Codegenerierung->[Laufzeitbibliothek] auf Multithreaded (/MT).

    Gruß SciFi



  • Thx, es funktioniert 👍 .


Anmelden zum Antworten