Menu

Problem with dev-c++

jarkko
2007-10-19
2012-09-26
  • jarkko

    jarkko - 2007-10-19

    I am trying to compile simple program that uses Datalayer ODBC-libary with dev-c++ but i keep getting following errors:
    [Linker error] undefined reference to _imp___ZN12_ZConnectionC1Ev' [Linker error] undefined reference to_ZConnection::~_ZConnection()'
    [Linker error] undefined reference to `_ZConnection::~_ZConnection()'
    ld returned 1 exit status
    C:\projects\sqltest\Makefile.win [Build Error] [Project1.exe] Error 1

    I have added DataLayer.lib to project options -> parameters -> linker and also added C:\projects\sqltest to library paths.

    project files and sourcecode can be downloaded here: http://koti.mbnet.fi/niempi2/sqltest.zip
    Datalayer-library: http://www.codeproject.com/database/DataLayer.asp

     
    • Anonymous

      Anonymous - 2007-10-19

      Libraries with .lib extensions are not necessarily compatible with MinGW/GCC. GNU libraries by convention are named lib<libraryname>.a.

      If this is an export library then it may be possible to use it either by a tool-chain upgrade from www.mingw.org or conversion using reimp.exe. However since it appears to be C++ your chances are low. C linkage for DLL's is standardised, but C++ compilers do not use the same name-mangling scheme, so the symbol names are unlikely to match. If all else fails you will have to build the library from source.

      You may still have configured the compiler incorrectly, so rather than taking the trouble to describe how you configured it, just post the full Compile Log as requested in the "PLEASE READ BEFORE POSTING A QUESTION" thread no less. That way, we can see exactly how you are building the project without any effort on your part, and without the possibility of inaccuracy.

      Clifford

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.