Dev-c++: Linking a library

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Josep

    Dev-c++: Linking a library

    Hi,

    I've got the library libmysqld.lib which links under MS VC++ without
    problem.
    But when I try to compile the same files + lib with Dev-C++ I get the Linker
    Error
    below... What am I doing wrong???

    Thanks,
    Josep

    ----------------------------------------------------

    Compiler: Default compiler
    Building Makefile: "E:\c++\mysql\d evc++\Makefile. win"
    Executing make...
    make.exe -f "E:\c++\mysql\d evc++\Makefile. win" all
    g++.exe EXE/test_dll.o EXE/StdAfx.o -o
    "EXE\test_dll.e xe" -L"C:/Programme/Dev-Cpp/lib" -L"release/libmysqld.lib"

    EXE/test_dll.o(.tex t+0x79):test_dl l.cpp: undefined reference to
    `mysql_server_i nit@12'
    EXE/test_dll.o(.tex t+0xd0):test_dl l.cpp: undefined reference to
    `mysql_close@4'
    EXE/test_dll.o(.tex t+0xde):test_dl l.cpp: undefined reference to
    `mysql_close@4'
    EXE/test_dll.o(.tex t+0xe6):test_dl l.cpp: undefined reference to
    `mysql_server_e nd@0'

    EXE/test_dll.o(.tex t+0x1aa):test_d ll.cpp: undefined reference to
    `mysql_init@4'
    EXE/test_dll.o(.tex t+0x1db):test_d ll.cpp: undefined reference to
    `mysql_options@ 12'
    EXE/test_dll.o(.tex t+0x1f5):test_d ll.cpp: undefined reference to
    `mysql_real_con nect@32'

    EXE/test_dll.o(.tex t+0x207):test_d ll.cpp: undefined reference to
    `mysql_error@4'
    EXE/test_dll.o(.tex t+0x231):test_d ll.cpp: undefined reference to
    `mysql_close@4'
    EXE/test_dll.o(.tex t+0x288):test_d ll.cpp: undefined reference to
    `mysql_query@8'
    EXE/test_dll.o(.tex t+0x29f):test_d ll.cpp: undefined reference to
    `mysql_field_co unt@4'
    EXE/test_dll.o(.tex t+0x2b5):test_d ll.cpp: undefined reference to
    `mysql_store_re sult@4'
    EXE/test_dll.o(.tex t+0x2d1):test_d ll.cpp: undefined reference to
    `mysql_num_fiel ds@4'
    EXE/test_dll.o(.tex t+0x2e2):test_d ll.cpp: undefined reference to
    `mysql_fetch_ro w@4'
    EXE/test_dll.o(.tex t+0x392):test_d ll.cpp: undefined reference to
    `mysql_affected _rows@4'
    EXE/test_dll.o(.tex t+0x3b4):test_d ll.cpp: undefined reference to
    `mysql_error@4'

    make.exe: *** [EXE/test_dll.exe] Error 1

    Execution terminated
    ------------------------------------------------------------


  • John Harrison

    #2
    Re: Dev-c++: Linking a library


    "Josep" <slotosREMOVETH IS@arcor.de> wrote in message
    news:404adfb3$0 $3122$9b4e6d93@ newsread4.arcor-online.net...[color=blue]
    > Hi,
    >
    > I've got the library libmysqld.lib which links under MS VC++ without
    > problem.
    > But when I try to compile the same files + lib with Dev-C++ I get the[/color]
    Linker[color=blue]
    > Error
    > below... What am I doing wrong???
    >[/color]

    This has nothing to do with the C++ language which is the topic of this
    newsgroup. 'How do I operate my compiler?' questions are off topic here and
    should be asked on a group dedicated to that compiler. Since Dev-C++ is just
    an IDE for the MingW compiler, perhaps you could try here for some help.


    john


    Comment

    Working...