-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference to 'cv::String::allocate(unsigned long)' #8
Comments
All right. I solved this. |
Hi Michael |
could you explain please @TLMichael , write full command line please |
Hi guys, I'm sorry I couldn't remember all the details, I compiled my project with OpenCV lib and Darknet lib (which can be compiled with CUDA itself). For .pro file and other details you can refer to my project Best, |
Hi, where do you have to add the dependencies? In the source file, the CMakeLists.txt or elsewhere? I have to deal with similar issues:
|
I solved it by adding -fPIC in CPPFLAGS. |
have you solved it? |
For my case: |
I am using android studio, can you help me know where can i find the linker? I am quite new to this, sorry |
undefined reference to `cv::String::allocate(unsigned long)' |
cvcamera.o: In function
cv::String::String(char const*)': /usr/local/include/opencv2/core/cvstd.hpp:602: undefined reference to
cv::String::allocate(unsigned long)'Makefile:268: recipe for target 'VideoTol' failed
cvcamera.o: In function
cv::String::~String()': /usr/local/include/opencv2/core/cvstd.hpp:648: undefined reference to
cv::String::deallocate()'cvcamera.o: In function
cv::Mat::Mat(int, int, int, void*, unsigned long)': /usr/local/include/opencv2/core/mat.inl.hpp:500: undefined reference to
cv::error(int, cv::String const&, char const*, char const*, int)'/usr/local/include/opencv2/core/mat.inl.hpp:516: undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered: