bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22367] New: invalid subsystem type Windows


From: hassan.draga at gmail dot com
Subject: [Bug ld/22367] New: invalid subsystem type Windows
Date: Sun, 29 Oct 2017 15:07:26 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22367

            Bug ID: 22367
           Summary: invalid subsystem type Windows
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hassan.draga at gmail dot com
  Target Milestone: ---

when i tray to run a Windows batch file from application (wxWidgets C++) GNU LD
show this error

---
C:\..path..\bin/ld.exe: invalid subsystem type Windows
---

and when double click on the same Windows batch file, GNU LD Work!

LD.bat
---
@echo off 

Set PATH=C:\AAA\BBB\GCC\bin

"C:\AAA\BBB\GCC\bin\g++.exe" -L"C:\AAA\BBB\GCC\lib\gcc_lib" -o
"C:\Users\XXX\Desktop\Test.exe" "C:\Users\XXX\Desktop\Test.obj"
"C:\Users\XXX\Desktop\Test.res" -s -mthreads -lwxmsw30u_core -lwxbase30u ...
-mwindows -static-libgcc -static-libstdc++ -finput-charset=utf-8
-Wl,--gc-sections -Os 2> "C:\Users\XXX\Desktop\Test.log"
---

App.cpp
---
wxArrayString output;
wxArrayString errors;
wxString CMD;
CMD = "C:\\Users\\XXX\\Desktop\\Test.bat";
wxExecute (CMD, output, errors);
---

If batch file executed by the application ==> error.
If batch file executed by double click ==> NO error.

The problem is fixed by removing [-mwindows] flag, but the executable not
linked as GUI but console mode.

Bug: if your path contain a folder name [Windows] like "%PATH%\Windows\.." GNU
LD show error.

Solution: just rename your folder from [Windows] to [Win] or anything else.. i
thing this is LD bug.

Tested on Windows 7 64Bits, Mingw 4.x.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]