undefined reference to `MysqlConnection: ...



  • Hi alle,
    ich probiere z.Zt. MySQL++ unter Suse 8.2 zum laufen zubringen.
    Bekomme allerdings schon bei testcodes einen Fehler, den ich nicht verstehe.
    Vielleicht könnt ihr mir ja helfen.

    linuxsql.cpp :

    #include <time.h> 
    #include <stdio.h> 
    #include </usr/include/sqlplus/sqlplus.hh> 
    int main ()  
    { 
     Connection con("mysql_cpp_data"); 
     return 0;
    }
    
    h3827:~/rayt_installs # g++ -I/usr/include/mysql -I/usr/include/sqlplus -lmysqlclient linuxsql.cpp
    In file included from /usr/include/g++/backward/iterator.h:30,
                     from /usr/include/sqlplus/resiter1.hh:6,
                     from /usr/include/sqlplus/row1.hh:10,
                     from /usr/include/sqlplus/compare1.hh:6,
                     from /usr/include/sqlplus/sqlplus.hh:13,
                     from linuxsql.cpp:3:
    /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file
     includes at least one deprecated or antiquated header. Please consider using 
    one of the 32 headers found in section 17.4.1.2 of the C++ standard. 
    Examples include substituting the <X> header for the <X.h> header for C++ includes, 
    or <sstream> instead of the deprecated header <strstream.h>. 
    To disable this warning use -Wno-deprecated.
    /tmp/ccl0206s.o: In function `main':
    /tmp/ccl0206s.o(.text+0x34): undefined reference to `MysqlConnection::MysqlConnection[in-charge](char const*, char const*, char const*, char const*, bool)'
    /tmp/ccl0206s.o(.text+0x46): undefined reference to `MysqlConnection::~MysqlConnection [in-charge]()'
    collect2: ld returned 1 exit status
    h3827:~/rayt_installs #
    

    Ich bin für jede Hilfe dankbar.

    Gruss,
    Proteus


Anmelden zum Antworten