I am running Code::Blocks version 12.11 on LMDE (based on Debian Testing).
The compiler I use is g++
version (Debian 4.7.3-4) 4.7.3
I have two classes in header files and cpp files as the c++ reference book recommend it and also have a main.cpp which use the classes.
I set the headers path to project build options > search directories > compiler, so i dont need to write the full path of headers when i include them.
The classes have some pointer inside them.
My problem is when i compile this as a project, i've got segmentation fault, but if i make it without a project, and include the full path of headers its works fine.
And of course, when i copy the class implementations and specifications to the main file and compile its work fine.
Build log:
||=== Build finished: 0 errors, 0 warnings (0 minutes, 0 seconds) ===|
When i try to run:
Segmentation fault
Process returned 139 (0x8B)execution time 0.054 s
Build log:
Checking for existence: /home/smoke/sdl2/2d_test/bin/Debug/2d_test
Executing: xterm -T 2d_test -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:/home/smoke/sdl2/2d_test/:/usr/lib/x86_64-linux-gnu /home/smoke/sdl2/2d_test/bin/Debug/2d_test (in /home/smoke/sdl2/2d_test/.)
Process terminated with status 0 (0 minutes, 1 seconds)
I have already tried compile it from terminal with headers on same directory and worked. So i think the problem causes the header search.