Looks like my guess is right, I just did some test, the Compiler plugin
DO add the lib search path to the PATH environment.
So, what's reason? (Maybe, under Linux, the .so file can be linked at both compiler time or run time.........Ok, that's the same thing under Windows, I can link to a dll file, but normally I should link to .a files)
I'm currently design a wizard for OpenCV library, it has such file structure:
<opencv root>
├─bin
├─include
│ └─opencv
├─lib
└─licenses
The bin folder contains all the dlls, the lib folder contains all the .a files. In this case, I would like the <opencv root>/bin folder automatically/temprarily added to the PATH when I click the "run" button. (This way, I don't need the manually add this bin path the System's PATH). But currently the only workaround is add the bin path to the library search path. (
$(#cv.bin) does not work, and
$(#cv)/bin works)
Any good suggestions. Thanks.
EDIT: the workaround by adding the bin folder has a drawback, look at the log:
[ 50.0%] g++.exe -g -IE:\code\opencv\opencv210_mingw\include -c main.cpp -o obj\Debug\main.o
[100.0%] g++.exe -LE:\code\opencv\opencv210_mingw\lib -LE:\code\opencv\opencv210_mingw\bin -o bin\Debug\jjjjj.exe obj\Debug\main.o -lcv210.dll -lcxcore210.dll -lhighgui210.dll
Output size is 99.56 KB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))
It looks like the link directly try to find the dll?
Look at the previous log:(no workaround)
[ 50.0%] g++.exe -g -IE:\code\opencv\opencv210_mingw\include -c main.cpp -o obj\Debug\main.o
[100.0%] g++.exe -LE:\code\opencv\opencv210_mingw\lib -o bin\Debug\jjjjj.exe obj\Debug\main.o -lcv210.dll -lcxcore210.dll -lhighgui210.dll
Output size is 99.56 KB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))
This should definitely link to the .a files.
This is my lib settings(see the screen shot below)