I am using scientific linux. I am trying to compile a project that uses a bunch of cpp files.
In the directory user/project/Build
, I enter make
to compile and link all the cpp files. I then have to go to user/run/
and then type ./run.sh values.txt
To debug with gdb, I have to go to user/run and then type gdb ../project/Build/bin/Project
and to run, I enter run -Project INPUT/inputfile.txt
. However, I am trying to print out the value of variable using p variablename
. However, I get the message s1 = <value optimized out>
. I done some research online, and it seems I need to compile without optimizations using -O0 to resolve this. But where do I enter that? In the CMakeLists
? If so, which CMakeLists? The one in project/Build
or project/src/project
?
Aucun commentaire:
Enregistrer un commentaire