Code: Select all
wxFileName filename(wxStandardPaths::Get().GetExecutablePath());
filename.SetExt("ini");
Why is there a difference between debug and release mode? How can I force the long format?
Thanks in advance.
Rob'
Code: Select all
wxFileName filename(wxStandardPaths::Get().GetExecutablePath());
filename.SetExt("ini");
Code: Select all
wxString str = wxStandardPaths::Get().GetExecutablePath();
wxMessageBox(str);
Code: Select all
c:\TDM-GCC-32\bin>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/TDM-GCC-32/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe
Target: mingw32
Configured with: ../../../src/gcc-git-9.2.0/configure --build=mingw32 --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --disable-build-format-warnings --enable-libstdcxx-time --with-gnu-ld --disable-werror --enable-nls --disable-win32-registry --disable-symvers --enable-large-address-aware --enable-cxx-flags='-fno-function-sections -fno-data-sections -DWINPTHREAD_STATIC' --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-checking=release --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 9.2.0 (tdm-1)
Code: Select all
windres.exe -IC:\dev\libs\wxWidgets-3.1.5-TDM-GCC\include -IC:\dev\libs\wxWidgets-3.1.5-TDM-GCC\lib\gcc_dll\mswud -J rc -O coff -i C:\dev\cb-tests\TESTPA~1\resource.rc -o obj\Debug\resource.res
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\dev\libs\wxWidgets-3.1.5-TDM-GCC\include -IC:\dev\libs\wxWidgets-3.1.5-TDM-GCC\lib\gcc_dll\mswud -c "C:\dev\cb-tests\test paths-tdm-gcc\test_pathsApp.cpp" -o obj\Debug\test_pathsApp.o
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\dev\libs\wxWidgets-3.1.5-TDM-GCC\include -IC:\dev\libs\wxWidgets-3.1.5-TDM-GCC\lib\gcc_dll\mswud -c "C:\dev\cb-tests\test paths-tdm-gcc\test_pathsMain.cpp" -o obj\Debug\test_pathsMain.o
g++.exe -LC:\dev\libs\wxWidgets-3.1.5-TDM-GCC\lib\gcc_dll -o bin\Debug\test-paths.exe obj\Debug\test_pathsApp.o obj\Debug\test_pathsMain.o obj\Debug\resource.res -mthreads -lwxmsw31ud_core -lwxbase31ud -mwindows
Output file is bin\Debug\test-paths.exe with size 2.47 MB
But if I have a space there (a space instead of a dash in the executable name here, i.e., "test paths.exe" vs "test-paths.exe"), then I get the short name since C::B launches GDB like this:Starting debugger: C:\TDM-GCC-32\bin\gdb32.exe -nx -fullname -quiet -args C:/dev/cb-tests/test-paths-tdm-gcc/bin/Debug/test-paths.exe
This looks as a C::B problem to me and it happens with GCC 12.2 as well. I would check if your executable full path in the debug build also does not have a space in it, unlike the one in the release build.Starting debugger: C:\TDM-GCC-32\bin\gdb32.exe -nx -fullname -quiet -args C:/dev/cb-tests/TEST-P~2/bin/Debug/TESTPA~1.EXE