Coder Social home page Coder Social logo

Comments (10)

TLMichael avatar TLMichael commented on July 2, 2024 7

All right. I solved this.
By LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio LIBS += -L/usr/local/lib -lopencv_core -lopencv_imgcodecs -lopencv_highgui

from qml-cvcamera.

 avatar commented on July 2, 2024

All right. I solved this.
By LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio LIBS += -L/usr/local/lib -lopencv_core -lopencv_imgcodecs -lopencv_highgui

Hi Michael
Can you provide the full make script to compile opencv with .cu file

from qml-cvcamera.

zongoalbert avatar zongoalbert commented on July 2, 2024

could you explain please @TLMichael , write full command line please

from qml-cvcamera.

TLMichael avatar TLMichael commented on July 2, 2024

Hi guys,

I'm sorry I couldn't remember all the details,
since the last time I dealt with this problem was two years ago.

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,
Michael.

from qml-cvcamera.

Totemi1324 avatar Totemi1324 commented on July 2, 2024

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:

CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::String::~String()':
/usr/include/opencv2/core/cvstd.hpp:648: undefined reference to `cv::String::deallocate()'
CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::String::operator=(cv::String const&)':
/usr/include/opencv2/core/cvstd.hpp:656: undefined reference to `cv::String::deallocate()'
CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::Mat::~Mat()':
/usr/include/opencv2/core/mat.inl.hpp:692: undefined reference to `cv::fastFree(void*)'
CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::Mat::release()':
/usr/include/opencv2/core/mat.inl.hpp:804: undefined reference to `cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status
CMakeFiles/main.dir/build.make:94: recipe for target 'main' failed
make[2]: *** [main] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
make[1]: *** [CMakeFiles/main.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

from qml-cvcamera.

csverma610 avatar csverma610 commented on July 2, 2024

I solved it by adding -fPIC in CPPFLAGS.

from qml-cvcamera.

liz821 avatar liz821 commented on July 2, 2024

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:

CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::String::~String()':
/usr/include/opencv2/core/cvstd.hpp:648: undefined reference to `cv::String::deallocate()'
CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::String::operator=(cv::String const&)':
/usr/include/opencv2/core/cvstd.hpp:656: undefined reference to `cv::String::deallocate()'
CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::Mat::~Mat()':
/usr/include/opencv2/core/mat.inl.hpp:692: undefined reference to `cv::fastFree(void*)'
CMakeFiles/main.dir/src/Main.cpp.o: In function `cv::Mat::release()':
/usr/include/opencv2/core/mat.inl.hpp:804: undefined reference to `cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status
CMakeFiles/main.dir/build.make:94: recipe for target 'main' failed
make[2]: *** [main] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
make[1]: *** [CMakeFiles/main.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

have you solved it?
and how?

from qml-cvcamera.

nguyencanhtrung avatar nguyencanhtrung commented on July 2, 2024

For my case:
adding followings to my linker solved the problem
-lopencv_videoio -lopencv_imgcodecs -lopencv_core -lopencv_imgproc -lopencv_features2d -lopencv_flann -lopencv_video -lopencv_calib3d -lopencv_highgui

from qml-cvcamera.

UtsaChattopadhyay avatar UtsaChattopadhyay commented on July 2, 2024

For my case: adding followings to my linker solved the problem -lopencv_videoio -lopencv_imgcodecs -lopencv_core -lopencv_imgproc -lopencv_features2d -lopencv_flann -lopencv_video -lopencv_calib3d -lopencv_highgui

I am using android studio, can you help me know where can i find the linker? I am quite new to this, sorry

from qml-cvcamera.

KingfaLuis avatar KingfaLuis commented on July 2, 2024

undefined reference to `cv::String::allocate(unsigned long)'

from qml-cvcamera.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.