JoyceZ
JoyceZ

Reputation: 37

ld.exe: cannot find -lopencv_createsamples.exe

I tried to use NetBeans+OpenCV+cmake+mingw to run KAZE_features.cpp.

I had already added up all the libraries to linker, including all files of opencv_(&&&).exe.

g++.exe -o dist/Debug/MinGW-Windows/welcome_1 build/Debug/MinGW-Windows/_ext/571919051/kaze_features.o -L../build/x64/mingw/bin -L../build/x64/mingw/lib -L../build/x64/vc10/bin -L../build/x64/vc10/lib -lopencv_createsamples.exe -lopencv_haartraining.exe -lopencv_perf_calib3d.exe 

But when I tried to debug the cpp, it kept show up thses errors:

c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot find -lopencv_createsamples.exe

Did I add .exe files to wrong place?? Anyone can give me an idea what s wrong here?

Thank you very much!!!

Upvotes: 0

Views: 549

Answers (1)

Dimitri Mockelyn
Dimitri Mockelyn

Reputation: 1545

The -l option is used to add libraries, but these .exe aren't libraries. It's just a test generated by the openCV compilation. Have you tried removing -lopencv_createsamples.exe -lopencv_haartraining.exe -lopencv_perf_calib3d.exe ?

If this doesn't works, try to add all the librairies manually like this : -lopencv_core245 -lopencv_highgui245 ...

Upvotes: 2

Related Questions