Dev-c++: Linking a library

Discussion in 'C++' started by Josep, Mar 7, 2004.

  1. Josep

    Josep Guest

    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\devc++\Makefile.win"
    Executing make...
    make.exe -f "E:\c++\mysql\devc++\Makefile.win" all
    g++.exe EXE/test_dll.o EXE/StdAfx.o -o
    "EXE\test_dll.exe" -L"C:/Programme/Dev-Cpp/lib" -L"release/libmysqld.lib"

    EXE/test_dll.o(.text+0x79):test_dll.cpp: undefined reference to
    `mysql_server_init@12'
    EXE/test_dll.o(.text+0xd0):test_dll.cpp: undefined reference to
    `mysql_close@4'
    EXE/test_dll.o(.text+0xde):test_dll.cpp: undefined reference to
    `mysql_close@4'
    EXE/test_dll.o(.text+0xe6):test_dll.cpp: undefined reference to
    `mysql_server_end@0'

    EXE/test_dll.o(.text+0x1aa):test_dll.cpp: undefined reference to
    `mysql_init@4'
    EXE/test_dll.o(.text+0x1db):test_dll.cpp: undefined reference to
    `mysql_options@12'
    EXE/test_dll.o(.text+0x1f5):test_dll.cpp: undefined reference to
    `mysql_real_connect@32'

    EXE/test_dll.o(.text+0x207):test_dll.cpp: undefined reference to
    `mysql_error@4'
    EXE/test_dll.o(.text+0x231):test_dll.cpp: undefined reference to
    `mysql_close@4'
    EXE/test_dll.o(.text+0x288):test_dll.cpp: undefined reference to
    `mysql_query@8'
    EXE/test_dll.o(.text+0x29f):test_dll.cpp: undefined reference to
    `mysql_field_count@4'
    EXE/test_dll.o(.text+0x2b5):test_dll.cpp: undefined reference to
    `mysql_store_result@4'
    EXE/test_dll.o(.text+0x2d1):test_dll.cpp: undefined reference to
    `mysql_num_fields@4'
    EXE/test_dll.o(.text+0x2e2):test_dll.cpp: undefined reference to
    `mysql_fetch_row@4'
    EXE/test_dll.o(.text+0x392):test_dll.cpp: undefined reference to
    `mysql_affected_rows@4'
    EXE/test_dll.o(.text+0x3b4):test_dll.cpp: undefined reference to
    `mysql_error@4'

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

    Execution terminated
    ------------------------------------------------------------
    Josep, Mar 7, 2004
    #1
    1. Advertising

  2. "Josep" <> wrote in message
    news:404adfb3$0$3122$-online.net...
    > 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???
    >


    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.
    http://www.mingw.org/

    john
    John Harrison, Mar 7, 2004
    #2
    1. Advertising

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. Ron Peterson

    /dev/urandom vs. /dev/random

    Ron Peterson, Jan 7, 2005, in forum: C Programming
    Replies:
    21
    Views:
    1,531
    Keith Thompson
    Jan 13, 2005
  2. AC
    Replies:
    0
    Views:
    157
  3. Guest
    Replies:
    2
    Views:
    150
    Bob Barrows [MVP]
    Sep 18, 2005
  4. Eirikur Hallgrimsson
    Replies:
    3
    Views:
    157
    Gavin Sinclair
    Oct 10, 2004
  5. Michele Dondi
    Replies:
    1
    Views:
    141
    Anno Siegel
    Feb 22, 2004
Loading...

Share This Page