Author Topic: unrecognised emulation mode: windows error  (Read 1475 times)

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
unrecognised emulation mode: windows error
« on: May 26, 2019, 09:54:43 pm »
I have an "unrecognised emulation mode: windows" error from ld.exe. The procedure that lead up to it:

I compiled wxWdigets 3.1.2 using the command lines from http://wiki.codeblocks.org/index.php/WxWindowsQuickRef . Below is the Windows 7 batch file I created to do the compilations:

Code: [Select]
:: Build_wxWidgets
:: ref http://wiki.codeblocks.org/index.php/WxWindowsQuickRef
:: Compiler download:
:: https://sourceforge.net/projects/mingw-64/files/latest/download

cd C:\wxWidgets-3.1.2\build\msw
mingw32-make.exe -f makefile.gcc MONOLITHIC=0 RC=1 SHARED=1 UNICODE=1 USE_OPENGL=1 BUILD=release clean
mingw32-make.exe -f makefile.gcc MONOLITHIC=0 RC=1 SHARED=1 UNICODE=1 USE_OPENGL=1 BUILD=debug clean

mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport >mingw32-make-release.txt 2>&1
mingw32-make -f makefile.gcc BUILD=debug SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport >mingw32-make-debug.txt 2>&1

This batch file worked to compile the both the release and debug versions.

I then started up the latest nightly build of Code::Blocks which is svn 1168 built on April 20, 2019. I navigated to "Settings => Compiler => Toolchain executables (tab)" . I did these settings:

Selected compiler: GNU GCC Compiler
Compiler's installation directory: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
C compiler: gcc.exe
C++ Compiler: g++.exe
Linker for dynamic libs: ld.exe
Linker for static libs: ld.exe
Debugger: GDB/CDB debugger: Default
Resource compiler: windres.exe
Make program: mingw32-make.exe

I then navigated to File => New project...
In the "New from template" dialog that opened I selected "wxWidgets" project, and clicked on "Go".
The wxWidgets version I selected was wxWidgets 3.1.x.

After entering the project name I did these radio button selections:
Preferred GUI Builder: wxSmith
Application type: Frame based

In the "wxWidgets location" field I entered: "C:\wxWidgets-3.1.2"

In the next compiler and configurations window I left all at default, but made sure both the Debug and the Release checkboxes were checked.

In "wxWidgets Library Settings" checked all checkboxes to match the options wxWidgets was compiled under. Checked were:
Use wxWidgets DLL ( Because SHARED=1 in the wxWidgets compilation command line )
wxWidgets is built as a monolithic library ( Because MONOLITHIC=1  in the wxWidgets compilation command line )
Enable Unicode ( Because UNICODE=1 in the wxWidgets compilation command line )

In "Miscellaneous Settings" I did these settings:
Create Empty Project: unchecked
Create and use Precompiled header (PCH): checked
Configure Advanced Options: checked

In "Advanced options (GCC only)"
Use_WXDEBUG_and Debut wxWidgets.lib: checked

In the "Debug Target" radio buttons:
GUI Mode Application: selected

In the "Release Target" radio buttons:
GUI Mode Application: selected

Upon clicking on "Finish" a starter project was created.

I navigated to "Project => Build options". In the project tree I selected "Debug" and set:
"Produce debugging symbols: [-g]": checked

I then selected "Debug" in the Code::Blocks menu bar and navigated to: "Project => Rebuild"

I got the error:

Code: [Select]
-------------- Clean: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------

Cleaned "TIA Designer - Debug"

-------------- Build: Debug in TIA Designer (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_dll\mswud -c "C:\Engineering Software\TIA Designer\wx_pch.h" -o wx_pch.h.gch\Debug_wx_pch_h_gch
windres.exe -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_dll\mswud  -J rc -O coff -i C:\ENGINE~1\TI65BD~1\resource.rc -o obj\Debug\resource.res
g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_dll\mswud -c "C:\Engineering Software\TIA Designer\TIA_DesignerApp.cpp" -o obj\Debug\TIA_DesignerApp.o
g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_dll\mswud -c "C:\Engineering Software\TIA Designer\TIA_DesignerMain.cpp" -o obj\Debug\TIA_DesignerMain.o
ld.exe -LC:\wxWidgets-3.1.2\lib\gcc_dll -o "bin\Debug\TIA Designer.exe"  obj\Debug\TIA_DesignerApp.o obj\Debug\TIA_DesignerMain.o obj\Debug\resource.res -mthreads  -lwxmsw31ud -mwindows
ld.exe: unrecognised emulation mode: windows
Supported emulations: i386pep i386pe
Process terminated with status 1 (0 minute(s), 13 second(s))
0 error(s), 0 warning(s) (0 minute(s), 13 second(s))
 

This appears to be related to the -mwindows option for ld.exe. I looked for, and did not find, a means to remove this option, or select alternatives to it. Where did this go wrong? What needs to be done to make this work?
« Last Edit: May 26, 2019, 09:58:22 pm by spflanze »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
Re: unrecognised emulation mode: windows error
« Reply #1 on: May 26, 2019, 10:16:28 pm »
Quote
wxWidgets is built as a monolithic library ( Because MONOLITHIC=1  in the wxWidgets compilation command line )

Above you said you used MONOLITHIC=0!!!

YOU CAN NOT BUILD BOTH MONOLITHIC and NON MONOLITHIC in the same folder.

For the clean command to work you should use the same options as the build with the clean target added.

Did you use the same exact compiler to build wxWidgets and to build the wxWidgets application?

Tim S.
« Last Edit: May 26, 2019, 10:19:44 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: unrecognised emulation mode: windows error
« Reply #2 on: May 31, 2019, 12:45:17 am »
The two clean operations should have been done with MONOLITHIC=1. I missed that when I created the batch file. Thank you for noticing it. The error has been corrected, and the batch file is now as is attached (remove the .txt extension, it was added to get it to attach here). This correction did not make a difference though. I still get that same error.

I tried this corrected batch file on two versions of the compiler. One had the Posix option. The other I tried,- because the error seemed windows related, had the win32 option. But I got the same error with both.

Please suggest solutions.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
Re: unrecognised emulation mode: windows error
« Reply #3 on: May 31, 2019, 01:44:03 am »
If you really called the file "mingw32-make.bat" then it might not be safe to use "mingw32-make" in the batch file; but, that is not likely the cause of your issue. I will change the "mingw32-make" to "mingw32-make.exe" when I try to duplicate your problem.

Edit: I have a very slow computer; so, it will take at least a day for me to duplicate your issue.

Tim S.
« Last Edit: May 31, 2019, 01:51:32 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
Re: unrecognised emulation mode: windows error
« Reply #4 on: May 31, 2019, 02:07:39 am »
What is the value you set for the linker for dynamic libs?
Linker for static libs?
These are toolchain settings.
Quote
Linker for dynamic libs: ld.exe
Linker for static libs: ld.exe

The above are likely both wrong!

I will be trying
Code: [Select]
Linker for dynamic libs: x86_64-w64-mingw32-g++.exe
Linker for static libs: ar.exe

Tim S.
« Last Edit: May 31, 2019, 02:14:35 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: unrecognised emulation mode: windows error
« Reply #5 on: May 31, 2019, 05:09:45 am »
Thanks for your linker recommendations. They solved the linker errors. I was able to compile a Debug version. But I was not able to step through its code. When starting a debug run with the red arrowhead the program's window did not open. It did open when I did a non-debug run using the green arrowhead. This is with wxWidgets compiled with the posix option.

The wizard created starter project can be downloaded from:
http://www.mediafire.com/file/1blj22yu8jgkfje/TIA_Designer.zip/file

The default.conf file can be downloaded from:
http://www.mediafire.com/file/2mzr2ul4vhx2lj3/default.conf/file
« Last Edit: May 31, 2019, 05:26:17 am by spflanze »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
Re: unrecognised emulation mode: windows error
« Reply #6 on: May 31, 2019, 05:22:14 am »
Thanks for your linker recommendations. They solved the linker errors. I was able to compile a Debug version. But I was not able to step through its code. When starting a debug run with the red arrowhead the program's window did not open. It did open when I did a non-debug run using the green arrowhead.

I have little ability to help with any debugging related issues; it is something I know very little about.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2455
Re: unrecognised emulation mode: windows error
« Reply #7 on: May 31, 2019, 09:44:37 am »
Quote
. When starting a debug run with the red arrowhead the program's window did not open
What does the debugger log say?
Please enable full debugger logging somewhere in Debugger->Settings->XXXXX to get a more informative output

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: unrecognised emulation mode: windows error
« Reply #8 on: June 02, 2019, 03:28:11 am »
The Debugger tab:
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Engineering Software\Test Posix\
Adding source dir: C:\Engineering Software\Test Posix\
Adding file: C:\Engineering Software\Test Posix\bin\Debug\Test Posix.exe
Changing directory to: C:/ENGINE~1/TESTPO~1/.
Set variable: PATH=.;C:\wxWidgets-3.1.2-posix\lib\gcc_dll;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64;C:\Program Files (x86)\Pico Technology\SDK\lib;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Pololu\Simple Motor Controller\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\IVI Foundation\VISA\Win64\Bin;C:\Program Files\doxygen\bin;C:\Anaconda2;C:\Anaconda2\Scripts;C:\Anaconda2\Library\bin;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files (x86)\nodejs;C:\KicadBOM;C:\Program Files (x86)\Raisonance\Ride\bin;C:\Program Files (x86)\Pico Technology\PicoScope6;C:\Program Files (x86)\Pico Technology\Pico Full;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\IVI Foundation\IVI\Bin;C:\Program Files\IVI Foundation\IVI\Bin;C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI;C:\Program Files\TortoiseSVN\bin;C:\Users\spflanze\AppData\Local\Programs\Python\Python36-32\Scripts;C:\Users\spflanze\AppData\Local\Programs\Python\Python36-32;C:\Users\spflanze\AppData\Roaming\npm;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\Dr. Memory\bin
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/ENGINE~1/TESTPO~1/bin/Debug/TESTPO~1.EXE
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No symbol table loaded.  Use the "file" command.
Debugger finished with status 0

The Build log tab:
Code: [Select]
-------------- Clean: Debug in Test Posix (compiler: GNU GCC Compiler)---------------

Cleaned "Test Posix - Debug"

-------------- Build: Debug in Test Posix (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswud -c "C:\Engineering Software\Test Posix\wx_pch.h" -o wx_pch.h.gch\Debug_wx_pch_h_gch
windres.exe -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswud  -J rc -O coff -i C:\ENGINE~1\TESTPO~1\resource.rc -o obj\Debug\resource.res
g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswud -c "C:\Engineering Software\Test Posix\Test_PosixApp.cpp" -o obj\Debug\Test_PosixApp.o
g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswud -c "C:\Engineering Software\Test Posix\Test_PosixMain.cpp" -o obj\Debug\Test_PosixMain.o
x86_64-w64-mingw32-g++.exe -LC:\wxWidgets-3.1.2-posix\lib\gcc_dll -o "bin\Debug\Test Posix.exe"  obj\Debug\Test_PosixApp.o obj\Debug\Test_PosixMain.o obj\Debug\resource.res -mthreads  -lwxmsw31ud -mwindows
Output file is bin\Debug\Test Posix.exe with size 928.49 KB
Process terminated with status 0 (0 minute(s), 13 second(s))
0 error(s), 0 warning(s) (0 minute(s), 13 second(s))

I do not know what this "file" command is.

The -g option was in effect.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: unrecognised emulation mode: windows error
« Reply #9 on: June 02, 2019, 05:05:58 am »
gdb does not like paths and files with blanks in the names.

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: unrecognised emulation mode: windows error
« Reply #10 on: June 04, 2019, 03:03:02 am »
I removed the spaces in the paths. But the error message remained the same.

Build log:
Code: [Select]
-------------- Clean: Debug in Test_Project_posix (compiler: GNU GCC Compiler)---------------

Cleaned "Test_Project_posix - Debug"

-------------- Build: Debug in Test_Project_posix (compiler: GNU GCC Compiler)---------------

g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu -c C:\Engineering_Software\Test_Project_posix\wx_pch.h -o wx_pch.h.gch\Debug_wx_pch_h_gch
windres.exe -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu  -J rc -O coff -i C:\ENGINE~1\TEST_P~2\resource.rc -o obj\Debug\resource.res
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu -c C:\Engineering_Software\Test_Project_posix\Test_Project_posixApp.cpp -o obj\Debug\Test_Project_posixApp.o
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu -c C:\Engineering_Software\Test_Project_posix\Test_Project_posixMain.cpp -o obj\Debug\Test_Project_posixMain.o
x86_64-w64-mingw32-g++.exe -LC:\wxWidgets-3.1.2-posix\lib\gcc_dll -o bin\Debug\Test_Project_posix.exe  obj\Debug\Test_Project_posixApp.o obj\Debug\Test_Project_posixMain.o obj\Debug\resource.res -mthreads  -lwxmsw31u -mwindows
Output file is bin\Debug\Test_Project_posix.exe with size 929.42 KB
Process terminated with status 0 (0 minute(s), 10 second(s))
0 error(s), 0 warning(s) (0 minute(s), 10 second(s))

Debug log:
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Engineering_Software\Test_Project_posix\
Adding source dir: C:\Engineering_Software\Test_Project_posix\
Adding file: C:\Engineering_Software\Test_Project_posix\bin\Debug\Test_Project_posix.exe
Changing directory to: C:/Engineering_Software/Test_Project_posix/.
Set variable: PATH=.;C:\wxWidgets-3.1.2-posix\lib\gcc_dll;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\Dr. Memory\bin
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/Engineering_Software/Test_Project_posix/bin/Debug/Test_Project_posix.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No symbol table loaded.  Use the "file" command.
Debugger finished with status 0

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2455
Re: unrecognised emulation mode: windows error
« Reply #11 on: June 04, 2019, 10:12:23 am »
There are some points you have to look out:
1) Are you using the correct debugger?
the debugger has to be "the same" as the compiler.
Check your debugger executable in Settings->Debugger->Default->Executable path
This should be the executable found in your compiler directory

2) Does your executable has debugging symbols:
Are you compiling with the -g flag?
You can use the debug target of your project for this

3) Do you use a compiler and debugger that have the same debugging symbols format? See 1) for a fix

4) Does your project uses the right debugger?
If you have multiple debugger configurations you have to select the right debugger:
Debug->Active debuggers->Targets default (with this option the debugger configuration of the compiler of this target is used see below) or select the propriate configuration, but then keep in mind that you have to keep the configuration in sync with your projects

How to select the default compiler of a target?
The default compiler configuration of the target is set by the default configuration of the compiler of this target. You can set the default configuration of this compiler here:
Settings->Compiler->Select the compiler from the drop down at the top->toolchain executables->Debugger

Also please enable full debugger log in
Settings->Debugger->Common->Full (debug) Log
and post a new log here if it still does not work

Hope something helps...

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: unrecognised emulation mode: windows error
« Reply #12 on: June 05, 2019, 08:12:42 am »
1) Settings->Debugger->Default->Executable path was:
C:\MinGW\bin\gdb.exe
This was not the same directory as the compiler. I made it the same.

2) The -g flag is in effect. This can be seen in the build log. It is actually in the compiler command line twice.

3) This is fixed now.

4) There is only one debugger in "Settings => Debugger", and it is the default one. The default debugger that is selected in "Settings => Compiler => Toolchain executables" is "GDB/CDB debugger : Default". This is the only choice there.

After the above fix (question 1) the error changed. When I attempt to step through the program I now get a error dialog opening with the message:
Quote
gdborig.exe has stopped working

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

The checkbox at "Settings->Debugger->Common->Full (debug) Log" is now checked. The log in the Debugger tab:

Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Engineering_Software\Test_Project_posix_WXDEBG_\
Adding source dir: C:\Engineering_Software\Test_Project_posix_WXDEBG_\
Adding file: C:\Engineering_Software\Test_Project_posix_WXDEBG_\bin\Debug\Test_Project_posix_WXDEBG_.exe
Changing directory to: C:/Engineering_Software/Test_Project_posix_WXDEBG_/.
Set variable: PATH=.;C:\wxWidgets-3.1.2-posix\lib\gcc_dll;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\Dr. Memory\bin

[debug]Command-line: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gdb.exe -nx -fullname -quiet  -args C:/Engineering_Software/Test_Project_posix_WXDEBG_/bin/Debug/Test_Project_posix_WXDEBG_.exe
[debug]Working dir : C:\Engineering_Software\Test_Project_posix_WXDEBG_

Starting debugger: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gdb.exe -nx -fullname -quiet  -args C:/Engineering_Software/Test_Project_posix_WXDEBG_/bin/Debug/Test_Project_posix_WXDEBG_.exe
done

[debug]Reading symbols from C:/Engineering_Software/Test_Project_posix_WXDEBG_/bin/Debug/Test_Project_posix_WXDEBG_.exe...
[debug]done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 8.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Engineering_Software/Test_Project_posix_WXDEBG_/
[debug]Source directories searched: C:/Engineering_Software/Test_Project_posix_WXDEBG_;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> start
[debug]Temporary breakpoint 2 at 0x4068d9
[debug]Starting program: C:\Engineering_Software\Test_Project_posix_WXDEBG_\bin\Debug\Test_Project_posix_WXDEBG_.exe

Child process PID: 10296

[debug][New Thread 10296.0x2bd0]
[debug]Temporary breakpoint 2, 0x00000000004068d9 in main ()
[debug]>>>>>>cb_gdb:
[debug]> info frame

Debugger finished with status 1

In "Settings => Compiler => Toolchain executables" I made these changes:

C Compiler:
From: gcc.exe
To: x86_64-w64-mingw32-gcc.exe

C++ Compiler:
From: g++
To: x86_64-w64-mingw32-g++.exe

After the above changes I got the same result. The Same error dialog opened with message that "gdborig.exe has stopped working".

Your help on this is much appreciated. :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
Re: unrecognised emulation mode: windows error
« Reply #13 on: June 05, 2019, 11:09:30 pm »
What is the path to your compiler?

Quote
Set variable: PATH=.;C:\wxWidgets-3.1.2-posix\lib\gcc_dll;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64;C:\Program Files (x86)\CodeBlocks\MinGW\bin;

Remove the path that is not to your compiler!

Edit: If I was you, I would uninstall or delete all MinGW GCC except for the one you are trying to get to work. But, I have no idea if this will help with debugging.

Tim S.
« Last Edit: June 05, 2019, 11:17:24 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: unrecognised emulation mode: windows error
« Reply #14 on: June 06, 2019, 05:40:12 am »
The path "C:\Program Files (x86)\CodeBlocks\MinGW\bin;" was not valid. That version of Code::Blocks had been removed, and so this left over path was a path to nowhere.  I did nevertheless remove it, did a clean recompile, and attempted to step through the program again. I got the same "gdborig.exe stopped working" error.