Then I compiled the example (which is just a single main.cpp file with sntoya code) using:
g++ -O -I/calculate/gabriel/Solvers/snopt/include -c main.cpp -o main.og++ -O main.o -o main -L/calculate/gabriel/Solvers/snopt/lib -lsnopt7_cpp
The error I get are around 30 undefined references of the type:
/calculate/gabriel/Solvers/snopt/lib/libsnopt7_cpp.so: undefined reference tosnkerc_'`
I checked the installation with make check - it works properly. However this happens anyways.
What am I doing wrong?
Hello, I am trying to compile a simple example using c++ interface. I used the code from sntoya example. I did following steps during installation:
export FC=/usr/bin/gfortran-7
~/Solvers/snopt7$ ./configure --prefix=/calculate/gabriel/Solvers/snopt --with-matlab=/opt/MATLAB/R2018b/bin --with-blas="-L/usr/lib/x86_64-linux-gnu -lblas" --with-c-cpp --with-pic
make
make install
Then I compiled the example (which is just a single main.cpp file with sntoya code) using:
g++ -O -I/calculate/gabriel/Solvers/snopt/include -c main.cpp -o main.o
g++ -O main.o -o main -L/calculate/gabriel/Solvers/snopt/lib -lsnopt7_cpp
The error I get are around 30 undefined references of the type:
/calculate/gabriel/Solvers/snopt/lib/libsnopt7_cpp.so: undefined reference to
snkerc_'`I checked the installation with make check - it works properly. However this happens anyways. What am I doing wrong?
Thanks in advance, Gabriel