ld.exe:找不到-lopencv_createsamples.exe

时间:2021-08-01 09:33:38

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

我尝试使用NetBeans+OpenCV+cmake+mingw来运行KAZE_features.cpp。

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

我已经将所有的库添加到链接器,包括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:

但是当我试图调试cpp时,它总是出现错误:

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?

我添加了。exe文件到错误的地方??谁能告诉我这里出了什么问题?

Thank you very much!!!

非常感谢! ! !

1 个解决方案

#1


2  

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 ?

l选项用于添加库,但是这些。exe不是库。它只是openCV编译生成的一个测试。您是否尝试删除-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 ...

如果这不起作用,请尝试手动添加所有的librairies: -lopencv_core245 -lopencv_highgui245…

#1


2  

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 ?

l选项用于添加库,但是这些。exe不是库。它只是openCV编译生成的一个测试。您是否尝试删除-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 ...

如果这不起作用,请尝试手动添加所有的librairies: -lopencv_core245 -lopencv_highgui245…