This is almost a general programming question, but any help would be
appreciated.
Root Problem:
/home/kiel/development/omms/output/libdbWrapper.a(dbwrapper.o): In
function `_ZN3srs9DbWrapper4openERKSs':
/home/kiel/development/omms/src/dbwrapper/dbwrapper.cpp:49: undefined
reference to `_sqlite3_open'
.
. .... more stuff
.
I have 3 possible ideas for the problem.
1) I messed up in building SQLite, and don't have what I need in order
to link to.
2) CMake can't find the required files
3) SQLite was build in without debug information and the rest of my
project is using debug information
For (1):
I downloaded the raw source and ran 'configure' and 'make' from a
separate folder. The resulting output I copied to /usr/lib/sqlite. In
it a see the bunch of .lo, .o and the two .la files (libsqlite3.la,
libtclsqlite3.la)
I am use to a Visual Studio build environment, but from what I
understand this is all I need. Please correction me if that assumption
is wrong.
For (2):
In my CMake file that deals with my wrapper I have this (among a couple
other unrelated things)
# Define the library that this file makes up.
ADD_LIBRARY(dbWrapper ${DBACCESS_SRCS})
# Link outside libraries
LINK_LIBRARIES(dbWrapper /usr/lib/sqlite/libsqlite3)
I've also tried '/usr/lib/sqlite/sqlite3' without luck. Does CMake spit
out warnings if it can't find a file to link to??
For (3):
I made no changes to the configuration file or make files. I'm running
ccmake specifying a 'debug' environment. I'm really not sure if this is
could cause the problem, but it crossed my mind.
I'm unsure what direction to go at this point and would appreciate any
guidance - whether it is a complete change of direction or not. I would
rather not use a .dll because I don't want my code to have to handle the
loading; I may change this later or if it is the recommendation of those
wiser =)