I trying to call MatLAB from my C++ code for visualising my results (basically for live plotting), and using Eclipse as my C++ IDE. The following steps are done:
1. Included header path : Project Properties>> C/C++ Build>> GCC C++ Compiler >> Includes >> added paths to -I
2. Included Library path: Project Properties>> C/C++ Build>> MinGW C++ Linker>> Libraries>> added paths to -L
3. Added libraries: Project Properties>> C/C++ Build>> MinGW C++ Linker>> Libraries>> added libraries to -l
My command line has:
g++ "-LC:\\matlab\\R2018b\\extern\\lib\\win64\\mingw64" -o MinCircle.exe MainMin.o -llibMatlabEngine.lib -llibmat.lib
-llibeng.lib
And I get the following error:
C:/MinGW-64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:cannot find -llibMatlabEngine.lib
C:/MinGW-64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:cannot find -llibmat.lib
C:/MinGW-64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:cannot find -llibeng.lib
Which, I guess, means that it is searching for the matlab libraries in the MinGW lib folder. Have I missed a step to link the libraries to matlab lib folder?
Matlab version: 2018b Eclipse version: 2019-03 (4.11.0)
Thanks!