Undefined reference even when linking to library (C++ evaluation version, Linux64)

49 views
Skip to first unread message

Wouter Spekkink

unread,
Oct 16, 2017, 5:20:58 AM10/16/17
to Sparksee
Hi all,

I am having an issue with the evaluation version of Sparksee. I built a very basic program, just as a test, which is basically a small adaptation of the example used in the starting guide. I can't get the program to compile correctly. I have also tried to use the exact example of the starting guide, but I have the same problem there.

Even when linking to the correct shared library, I keep getting an "undefined reference" error whenever I call one of Sparksee's methods. The error looks like this:

make -k
/usr/lib/x86_64-linux-gnu/qt5/bin/qmake -o Makefile esDatabase.pro
g++ -m64 -Wl,-O1 -o esDatabase main.o   -L/usr/X11R6/lib64 -L/home/wouterspekkink/sparkseecpp-5.2.3/lib/linux64 -lsparksee -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread 
main.o: In function `main':
main.cpp:(.text.startup+0x124): undefined reference to `sparksee::gdb::Sparksee::Create(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
collect2: error: ld returned 1 exit status
Makefile:138: recipe for target 'esDatabase' failed
make: *** [esDatabase] Error 1
make: Target 'first' not remade because of errors.

Compilation exited abnormally with code 2 at Mon Oct 16 10:11:32

I've tried a bunch of things, like changing the order in which the libraries are linked, using the linux32 folder (this will just give me an error that I was trying to link to an incompatible library), and so on.

It almost seems like the methods were not actually implemented in the library, but perhaps I am doing something wrong (I am not exactly an expert coder). 

Does anyone have an idea what might be it?

Thanks in advance.

Wouter Spekkink

c3po.ac

unread,
Oct 16, 2017, 6:07:26 AM10/16/17
to Sparksee

Hi,

It looks like you need the Sparksee version for C++11 linux 64.

Please, ask Dàmaris for the right version for you.

Best regrads


El dilluns, 16 octubre de 2017 11:20:58 UTC+2, Wouter Spekkink va escriure:

Wouter Spekkink

unread,
Oct 16, 2017, 10:27:45 AM10/16/17
to Sparksee
Hi,

Thanks for your quick response, and thanks for figuring out what causes the problem. After a bit of searching I just tried compiling the code with "#define _GLIBCXX_USE_CXX11_ABI" at the top of the source file, and it compiled with the evaluation version of the C++ code.

I will contact Dàmaris and ask about a C++11 version of Sparksee. 

Thanks again.

Best,

Wouter




Op maandag 16 oktober 2017 11:07:26 UTC+1 schreef c3po.ac:
Reply all
Reply to author
Forward
0 new messages