windows - What is causing g++ to produce the error: "ld.exe cannot find -lopencv_world310"? -
i attempting build application using g++ composed of several source files , uses opencv 3.1.0.
the cmd command is:
g++ -o home_surveillance -static -std=c++11 -m64 -ic:\tools\opencv\opencv\build\include -lc:\tools\opencv\opencv\build\x64\vc14\lib -lopencv_world310 configuration_manager.cpp events.cpp image_processor.cpp main.cpp response_module.cpp scheduler.cpp
the error produced is:
c:/program files/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_world310 collect2.exe: error: ld returned 1 exit status
i have been trying various things , searching answers couple days now. should note application builds in visual studio 2015. have tried compiling source files using g++ -c option , seem compile fine. linking phase produces error.
things have tried:
just every possible combination of specified command. (modifying order of options, -lopencv_world310.a, -lopencv_world310.lib, -lopencv_world310, -l"full_path"+"opencv_world310", etc..)
checked paths , filenames correct.
reinstalled mingw make sure using mingw-w64 since 64-bit application.
running cmd admin thinking maybe cmd not access path specified -l option.
googling , reading every post find. (most posts "ld.exe cannot find "library_name" result of using "library_name".a or "library_name".lib input -l option).
reading mingw documentation on use of gcc/g++ ensure wasn't missing obvious.
praying bjarne stroustrup.
ritual sacrifice involving pentium 2.
Comments
Post a Comment