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?