Once again I'm back to write to you how I solved my problem. I added some more couts to the code to see where exactly the program fails. The point _is_ in the file configfile.cpp, here:
Code:
CONFIGFILE::CONFIGFILE(string fname)
{
//vars = NULL;
SUPPRESS_ERROR = false;
Load(fname);
}
After adding one cout like this:
Code:
CONFIGFILE::CONFIGFILE(string fname)
{
//vars = NULL;
SUPPRESS_ERROR = false;
//workaround for the buggy gcc
cout << "";
Load(fname);
}
the program runs well. Writing some other types of code (not cout) here didn't work for me.
The workauround is not needed when:
1) compiled for 32bit (let's say not -march=athlon64)
or
2) compiled with different gcc (in my case gcc-4.1 (GCC) 4.1.3 20070831 (prerelease) (Debian 4.1.2-16)) in 64bit mode
or
3) copiled for 64bit without any optimization enabled (not even -O2)
The workaround is needed when:
1) using
gcc (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
or
gcc (GCC) 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)
2) while you want the optimizations to be enabled (-O2 or -O3)
3) compiling for the -march=athlon64
I'm not any C++ hacker but I would say it's some bug in 4.2 compilator (optimization for athlon64).
For thelusiv - you were right. And my ldd vdrift is:
Quote: libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x00002b8e1471c000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00002b8e149d2000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00002b8e14ba0000)
libSDL_image-1.2.so.0 => /usr/lib/libSDL_image-1.2.so.0 (0x00002b8e14e22000)
libSDL_net-1.2.so.0 => /usr/lib/libSDL_net-1.2.so.0 (0x00002b8e1503f000)
libSDL_gfx.so.4 => /usr/lib/libSDL_gfx.so.4 (0x00002b8e15242000)
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00002b8e15353000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002b8e1555b000)
libm.so.6 => /lib/libm.so.6 (0x00002b8e15863000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002b8e15ae4000)
libc.so.6 => /lib/libc.so.6 (0x00002b8e15cf3000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00002b8e16051000)
libasound.so.2 => /usr/lib/libasound.so.2 (0x00002b8e1626c000)
libdl.so.2 => /lib/libdl.so.2 (0x00002b8e1654c000)
libdirectfb-0.9.so.25 => /usr/lib/libdirectfb-0.9.so.25 (0x00002b8e16750000)
libfusion-0.9.so.25 => /usr/lib/libfusion-0.9.so.25 (0x00002b8e169b0000)
libdirect-0.9.so.25 => /usr/lib/libdirect-0.9.so.25 (0x00002b8e16bb7000)
libvga.so.1 => /usr/lib/libvga.so.1 (0x00002b8e16dc7000)
libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x00002b8e16f2e000)
libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0x00002b8e17a8f000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00002b8e17b90000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00002b8e17ca1000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00002b8e17eab000)
libz.so.1 => /usr/lib/libz.so.1 (0x00002b8e180cf000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00002b8e182e6000)
/lib64/ld-linux-x86-64.so.2 (0x00002b8e144fe000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00002b8e18512000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00002b8e18614000)
libogg.so.0 => /usr/lib/libogg.so.0 (0x00002b8e1871a000)