0

Can someone please show me how to use the C++ wrapper classes for SCIP? I don't know how the Makefiles in the examples work. I tried simply using the command

g++ -Wall example.cpp 

but when I do this it tells me that scip/scip.h: fatal error: scip/def.h: No such file or directory. I'm sure I'm in the right directory. Anyone know what's going on?

Karol S
  • 9,028
  • 2
  • 32
  • 45
migs
  • 164
  • 10
  • Which example do you try to compile? I cannot find any SCIP example which has an `example.cpp`. Plus: Please change the title of your question. This is __clearly__ a question about how to use the SCIP Makefile system. For starters, I recommend to read [How To start a new projects](http://scip.zib.de/doc/html/START.php) and follow the instructions there. – Gregor Aug 22 '14 at 09:00

1 Answers1

1

Best, for the use of the wrapper classes you take a look at the TSP example in the example/TSP subdirectory in your SCIP directory. There, the HeurFrats.* files will probably help you understand how the C++ wrappers are use, here for a heuristic.

For your make problems, if you again adapt the TSP example, what you need to do is, change the MAINOBJ files in the example Makefile. In your case, MAINOBJ = example.o should be sufficient. Therefor, you need to put your example.cpp into the subdirectory called src. This should be the way to adapt an example, and you do not need to change any other thing in such a Makefile. Afterwards you can compile with

make

or

make OPT=dbg

which compiles your source in debug mode and should enable additional checks.

In your specific example above the include paths of the necessary headers are missing, you might be able to compile by:

g++ -Ipathtoscip/src -Wall example.cpp 
Mic
  • 61
  • 2