Linking fails – mysql

Sysprogs forums Forums VisualGDB Linking fails – mysql

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10829
    benlarsendk
    Participant

    Hello.

    I’m trying to build a piece of software, that connects to a local db. I’m using visual gdb and visual studio 2015.
    When I try to link with the libmysqlcppconn.so, it fails:

     

    1> Linking CXX executable DatabaseConnection
    1> /usr/lib/libmysqlcppconn.so: file not recognized: File format not recognized
    1>collect2 : error : ld returned 1 exit status

     

    What am I doing wrong? I have set the library path in the settings.
    My CMakelist is:

     

    cmake_minimum_required(VERSION 2.7)
    project(DatabaseConnection)
    set(LIBRARIES_FROM_REFERENCES “”)
    set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++11”)
    add_executable(DatabaseConnection DatabaseConnection.cpp LocalMySQLHandler.cpp Meassurement.cpp MSSet.cpp)
    target_link_libraries(DatabaseConnection -L/usr/lib -lmysqlcppconn “${LIBRARIES_FROM_REFERENCES}”)

     

    Can anyone help?

    #10830
    support
    Keymaster

    Hi,

    Looks like libmysqlcppconn.so is corrupt or taken from an incompatible system. Please double-check the file and try reinstalling the package that provides it.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.