1. eubind for 4.2 not respecting -con
- Posted by axtens_bruce in March
- 460 views
I just used -con with eubind but the resulting exe is still launching a separate window.
Is there a separate tool? There was a "setsubsys.exe" I used to use years ago for just this task.
-Bruce
2. Re: eubind for 4.2 not respecting -con
- Posted by ghaberek (admin) in March
- 412 views
I just used -con with eubind but the resulting exe is still launching a separate window.
Is there a separate tool? There was a "setsubsys.exe" I used to use years ago for just this task.
It looks like -con flag is just a way of specifying the backed as either eub.exe (console) or eubw.exe (windows), which you can also specify with the -eub flag.
The problem it seems, is that eub and eubw.exe aren't actually any different, and eub.exe still runs in a new window. You can test this by shrouding and then running your il file with either backend.
eushroud.exe test.ex -- create our il file eubw.exe test.il -- opens a new window, as expected eub.exe test.il -- opens a new window, but shouldn't
Pretty sure this is a problem in the Makefile. Looks like this section in Makefile.gnu is wrong:
$(BUILDDIR)/$(EBACKENDC) $(BUILDDIR)/$(EBACKENDW) : $(EUB_RES) $(EUBW_RES) $(CC) $(EOSFLAGS) $(EUB_RES) $(EU_BACKEND_RUNNER_OBJECTS) $(EU_BACKEND_OBJECTS) -lm $(LDLFLAG) $(COVERAGELIB) $(DEBUG_FLAGS) $(MSIZE) $(PROFILE_FLAGS) -o $(BUILDDIR)/$(EBACKENDC) ifeq "$(EMINGW)" "1" $(CC) $(EOSFLAGS) $(EUBW_RES) $(EU_BACKEND_RUNNER_OBJECTS) $(EU_BACKEND_OBJECTS) -lm $(LDLFLAG) $(COVERAGELIB) $(DEBUG_FLAGS) $(MSIZE) $(PROFILE_FLAGS) -o $(BUILDDIR)/$(EBACKENDW) endif
The first line builds eub.exe and the second line (in the ifeq block) builds eubw.exe, but only for MinGW/Windows. In the first line, $(EOSFLAGS) needs to be changed to $(EOSFLAGSCONSOLE) which will remove -mwindows from the flags.
You could try this yourself but I'll include it with latest updates to build.mak, which are nearly complete. (Note to self: separate the EBACKENDC/EBACKENDW targets and put all "W" targets in their own ifeq block.)
-Greg