snopt / snopt-interface

C/C++ API for SNOPT7
MIT License
27 stars 12 forks source link

how to make sntoyA cpp example #6

Closed nedatym closed 6 years ago

nedatym commented 7 years ago

Hi,

I've proposed to run sntoya.cpp from cppexamples. I've generated a Makefile from Makefile.in, but when I do make, I have this error: No rule to make target /snopt_wrapper.lo', needed bylib/libsnopt7_c.la'. Stop.

Can you please help me with this issue?

Thanks. Neda

gnowzil commented 7 years ago

Can you try with the latest release? I've updated configure and Makefile.

salimoha commented 7 years ago

Hi, I cannot make the C example working. I have the snopt working in python, but I need a cpp version. I am not able to run snoptA as well

gnowzil commented 7 years ago

You're getting the same error...? It would be helpful if you provided more details.

(Also if unrelated to the original issue, it might be better to create a new one. Thanks.)

salimoha commented 7 years ago

I was wondering how I could make the executable examples in C or cpp? I want to use snopt as a solver in my cpp code. how can I use it in that way?

When I do: g++ -O -I $SNOPT/include -c sntoya.cpp -o myProb.o

I will get: sntoya.cpp:5:28: fatal error: snoptProblem.hpp: No such file or directory compilation terminated.

gnowzil commented 6 years ago

Is snoptProblem.hpp in the directory $SNOPT/include?

salimoha commented 6 years ago

yes. snopt.h snoptProblem.hpp are included in the include folder