I've been following this guide on how to cross compile QT for raspbian: http://exploreembedded.tumblr.com/post/115333857238/guide-to-cross-compile-qt-54-for-the-raspberry-pi
It's some months old, so certain changes have been made to fit it with Jessie and qt 5.5 instead of Wheezy and qt 5.4. However I've gotten down to the configure and make portion of the guide and I am completely stuck. When running $make, I'm getting a bunch of these errors:
.obj/qeasingcurve.o:qeasingcurve.cpp:function easeInOutCirc(double): error: undefined reference to 'sqrt'
.obj/qeasingcurve.o:qeasingcurve.cpp:function easeOutCirc(double): error: undefined reference to 'sqrt'
.obj/qeasingcurve.o:qeasingcurve.cpp:function easeInCirc(double): error: undefined reference to 'sqrt'
.obj/qeasingcurve.o:qeasingcurve.cpp:function easeOutInSine(double): error: undefined reference to 'cos'
By googling, I've gotten some understand as to why this is happening (Looks like math library needs to be linked manually for some unexplained reason), but not as to how I can fix it. Ideas?
Since no one seemed to know the answer, I found another way of doing it that seems to work with some fiddling instead: https://wiki.qt.io/RaspberryPi2EGLFS
Related
I had a very well working LLVM pass, but it seems to not work anymore for a very mysterious reason. I have also tried to make a basic tutorial pass work following this. But it gives me the same error:
error: unable to load plugin
'/Clang/llvm-pass-tutorial-master/build/skeleton/libSkeletonPass.so':
'/Clang/llvm-pass-tutorial-master/build/skeleton/libSkeletonPass.so:
undefined symbol: _ZN4llvm24DisableABIBreakingChecksE'
It seems like a compatibility problem, maybe caused by an update. So, I have tried to rebuild LLVM and the pass but still got the error. Any idea on what I should do ?
I am using Qt 5.7 on Ubuntu 16 LTS machine.
I get this error:
(.qtversion[qt_version_tag]+0x0):-1: error: undefined reference to `qt_version_tag'
This error comes only when I use SDL libraries.
I realize this is an old thread but you may be able to avoid it by defining QT_NO_VERSION_TAGGING; that is, by passing the option:
-DQT_NO_VERSION_TAGGING
to gcc.
I'm trying to install RcppGSL as presented in
Linking GSL library to RcppGSL on Windows machine
after copping the library as presented in the link above to C:/local323
and moving all the files in x64 up one directory into into LIB_GSL/lib as presented in the link. I used the following code.
library(Rcpp)
Sys.setenv("LIB_GSL" = "C:/local323") # this is where the library is located
Sys.setenv("PKG_LIBS"="-L(LIB_GSL)/lib -lgsl -lgslcblas")
install.packages("RcppGSL")
I added the line
Sys.setenv("PKG_LIBS"="-L(LIB_GSL)/lib -lgsl -lgslcblas")
after getting the following error(and I still got the same error) after doing some research and thought there might be a linking problem(just guessing).
The error I received was
RcppExports.o:RcppExports.cpp:(.text+0x916): undefined reference to `gsl_matrix_alloc'
RcppExports.o:RcppExports.cpp:(.text+0x945): undefined reference to `gsl_matrix_set'
RcppExports.o:RcppExports.cpp:(.text+0x993): undefined reference to `gsl_vector_calloc'
fastLm.o:fastLm.cpp:(.text+0x122): undefined reference to `gsl_vector_calloc'
fastLm.o:fastLm.cpp:(.text+0x131): undefined reference to `gsl_matrix_alloc'
fastLm.o:fastLm.cpp:(.text+0x142): undefined reference to `gsl_multifit_linear_alloc'
fastLm.o:fastLm.cpp:(.text+0x16d): undefined reference to `gsl_multifit_linear'
fastLm.o:fastLm.cpp:(.text+0x175): undefined reference to `gsl_multifit_linear_free'
fastLm.o:fastLm.cpp:(.text+0x24f): undefined reference to `gsl_matrix_diagonal'
setErrorHandler.o:setErrorHandler.cpp:(.text+0x104): undefined reference to `gsl_set_error_handler_off'
setErrorHandler.o:setErrorHandler.cpp:(.text+0x133): undefined reference to `gsl_set_error_handler'
any help is greatly appreciated!
Very best,
Steve
I would try this on the command-line, ie in cmd.exe -- not from R.
That way you should see the compilation and linking steps which may help when something go south.
"It builds at CRAN ..." so with the right files in the right location, and the proper env var set it should for you too.
Well I do not know why the following worked but I'm able to use RcppGSL
I followed the procedure from the link I posted exactly. Then instead of using
install.packages("RcppGSL")
I downloaded the zip file from CRAN and installed the package via the R GUI with the option to install from a zip. These should be identical I know, but using install.packages("RcppGSL").
Also
Sys.setenv("LIB_GSL" = "C:/local323")
is required anytime I try to compile an Rcpp file that uses the library.
I'm not sure why, but I can use the library at least.
Dirk thank you for your help. I will go over the tutorial on R-extensions to see if I can figure out what is going on.
I'll start by saying that I don't have much experience at all with compiled languages, this may be obvious but I've done a few solid hours searching and have come up empty-handed.
I am trying to build this project in Eclipse. I have built and imported OpenCV 3.1, and everything seems okay until I go to build the project. At that point I get a wide array of error messages saying that I have 'undefined references'.
For example:
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL15icvRemoveWindowP8CvWindow+0x11b): undefined reference to `SelectObject#8'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL15icvRemoveWindowP8CvWindow+0x126): undefined reference to `DeleteObject#4'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL15icvRemoveWindowP8CvWindow+0x138): undefined reference to `DeleteDC#4'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL16icvGetBitmapDataP8CvWindowP7tagSIZEPiPPv.isra.0+0x1e): undefined reference to `GdiFlush#0'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL16icvGetBitmapDataP8CvWindowP7tagSIZEPiPPv.isra.0+0x32): undefined reference to `GetCurrentObject#8'
C:\dev\opencv\build\x64\mingw_s\lib/libopencv_highgui310.a(window_w32.cpp.obj):window_w32.cpp:(.text$_ZL16icvGetBitmapDataP8CvWindowP7tagSIZEPiPPv.isra.0+0x6d): undefined reference to `GetObjectA#12'
Full console output is here.
From what I've seen, the causes of this error in general can be varied, perhaps the specifics of my case would allow a more precise answer.
I get the feeling that I'm not importing something correctly, or not setting an appropriate flag, but I have no idea what it is, or how to accomplish it. Any help would be greatly appreciated.
Matt
All your missing functions are in Gdi32.lib Search "msdn SelectObject" (for example) - scroll down to requirements add missing libraries to project
-- comment by Richard Critten
I am trying to build some code with G++4.8. Operating system is FreeBSD 9.2 64-bit.
These are the errors I get:
/usr/local/lib/gcc48/include/c++/tr1/hashtable_policy.h:384: undefined reference to `std::tr1::__detail::__prime_list'
/usr/local/lib/gcc48/include/c++/bits/stl_list.h:1570: undefined reference to `std::__detail::_List_node_base::_M_unhook()'
/usr/local/lib/gcc48/include/c++/bits/stl_list.h:1562: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
I read somewhere that those functions are in libstdc++. Reading this I've added that lib at my project, but I still get those errors. I should add libstdg++ instead? Or it's something else? I don't get it.
I've got the same errors when I linked the program using cc instead of gcc because of a misconfiguration of the Makefile program.