Reputation: 21
I experience a problem with compiling a project written with QtCreator. The first thing is that the project works fine under OS X (were it was developped first), and doesn't compile under Linux (Mint). We first had to correct issues due to the fact that Linux is case sensitive while OS X isn't.
Now, we get a problem we can't solve.
We use the RInside API and it looks like a linking problem. Whatever we try, we get the followwing error :
/home/patrick/Taf/rthing/src/IHM/main.cpp:8: erreur : undefined reference to `RInside::RInside(int, char const* const*, bool, bool, bool)'
Here are some elements of the project.
3 lines of the makefile, including calls to RInside :
CXXFLAGS = -pipe -Wno-unused-parameter -I/usr/share/R/include -I/home/patrick/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include -I/home/patrick/R/x86_64-pc-linux-gnu-library/3.0/RInside/include -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC $(DEFINES)
INCPATH = -I../IHM -I. -I-I/home/patrick/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include -I-I/home/patrick/R/x86_64-pc-linux-gnu-library/3.0/RInside/include -I../../../../Qt/5.6/gcc_64/include -I../../../../Qt/5.6/gcc_64/include/QtSvg -I../../../../Qt/5.6/gcc_64/include/QtWidgets -I../../../../Qt/5.6/gcc_64/include/QtGui -I../../../../Qt/5.6/gcc_64/include/QtCore -I. -I../../../../Qt/5.6/gcc_64/mkspecs/linux-g++
LFLAGS = -L/usr/lib/R/lib -lR -lblas -llapack -L/home/patrick/R/x86_64-pc-linux-gnu-library/3.0/RInside/lib -lRInside -Wl,-rpath,/home/patrick/R/x86_64-pc-linux-gnu-library/3.0/RInside/lib -Wl,-z,origin -Wl,-rpath,\$$ORIGIN -Wl,-rpath,/home/patrick/Qt/5.6/gcc_64/lib
Referring to those lines of the .pro file :
RINSIDEINCL = $$system($$R_HOM/bin/Rscript -e \'RInside:::CxxFlags\(\)\')
RINSIDELIBS = $$system($$R_HOM/bin/Rscript -e \'RInside:::LdFlags\(\)\')
patrick@petitchat:/usr/lib/R/bin$ Rscript -e 'Rcpp:::CxxFlags()'
gives :
-I/home/patrick/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include
and
Rscript -e 'Rcpp:::LdFlags()'
gives nothing (that's the case on the Mac too).
If someone can help, I'm available to give some more information about the project.
Upvotes: 0
Views: 92
Reputation: 368389
Use via QtCreator is a little outside our supported specs.
I would suggest the following:
examples/qt
via qmake; make
Upvotes: 1