Euphoria
Ticket #620:
minGW build fails configure, missing lib
-
Reported by
ne1uno
Feb 19, 2011
see ticket:598
4.1 source/be_runtime.c
#ifdef EWINDOWS
#ifdef EMINGW
#define _WIN32_IE 0x0400
#endif
#include <windows.h>
#include <commctrl.h>
#endif
and
change
#ifdef EWINDOWS
{
to
#if defined(EWINDOWS) && !defined(EALIGN4)
{
/* Make sure the common controls stuff is initialized.
* Since we use a manifest, we have to make sure that
* comdlg32.dll is loaded, or GUI stuff won't work.
*
* except align4, manifest ignored on win9x.
*/
source/makefile.gnu
ifeq "$(MANAGED_MEM)" "1"
ifeq "$(ALIGN4)" "1"
MEM_FLAGS=-DEALIGN4
else
MEM_FLAGS=
LDLFLAG+= -lcomctl32 -lcomdlg32
endif
else
ifeq "$(ALIGN4)" "1"
MEM_FLAGS=-DEALIGN4 -DESIMPLE_MALLOC
else
MEM_FLAGS=-DESIMPLE_MALLOC
LDLFLAG+= -lcomctl32 -lcomdlg32
endif
endif
source/buildsys.e
l_flags &= " -mno-cygwin -lws2_32 -lcomctl32 -lcomdlg32"
source/configure.
if echo "$UNAME_MACHINE" | grep "i[1-7]86" > /dev/null; then
echo ARCH=ix86
should be
if echo "$UNAME_MACHINE" | grep "i[1-7]86" > /dev/null; then
ARCH=ix86
add to:
elif test $UNAME_SYSTEM = "WINDOWS"; then
EHOST=EWINDOWS
TARGET=EWIN
RC=windres
not sure this is everything for both versions. not done testing in both 4.1 and 4.0.1 yet. will push changes then unless someone else gets to it first.
Details
1. Comment by jimcbrown
Feb 19, 2011
Remember, the official releases (which run on all Windows versions) are built with align4.
So, what you are saying is that the fix for 598 breaks Windows 9x and needs to be reverted.
We can probably use the other workaround Matt suggested, and dynamically load the dll in std/msgbox.e (and I guess msgbox.e as well?)
2. Comment by ne1uno
Feb 20, 2011
jim, I've suggested nothing of the sort. except that from memory, the EX versions are usually not available in win9x libs and so may fail to compile, not on a win9x system to check, but there was no messagebox problem on 9x. not every system will even experiance the problem depending on what configuration used.
3. Comment by ne1uno
Feb 20, 2011
Remember, the official releases (which run on all Windows versions) are built with align4. woops, if that will be true, then that #if won't work as intended. maybe this particular *EX routine will work on win9x? good posibility since it's part of internet explorer version 3.
probably some timing tests should be done align4 vrs not before deciding.
4. Comment by mattlewis
Feb 27, 2011
See: hg:euphoria/rev/fe38da20b35f
changeset: 4680:fe38da20b35f branch: 4.0 parent: 4678:f66713a408d1 user: Matt Lewis date: Sun Feb 27 17:21:59 2011 -0500 files: docs/release/4.0.1.txt source/Makefile.gnu description:
- added comdlg32.dll to mingw linker flags
- fixes ticket 620
5. Comment by ne1uno
Mar 08, 2011
chg to fixed please confirm,
unless add
source/be_runtime.c
#ifdef EWINDOWS
#ifdef EMINGW
#define _WIN32_IE 0x0400
#endif
#include <windows.h>
#include <commctrl.h>
#
InitControlsEx is not defined
only -lcomdlg32 will not link in minGW, needs -lcomctl32
not sure how watcom gets there, but both minGW and watcom eui and euc only link to comdlg32.dll confirmed with depends.
and buildsys.e also needs -lcomctl32 for the minGW translated programs to link.
without some way to eliminate the code in source/be_runtime.c for win9x I am guessing it will fail, but I haven't confirmed that for sure yet. though the extra linking is not a problem.
6. Comment by mattlewis
Mar 08, 2011
See: hg:euphoria/rev/987a3976b9eb
changeset: 4714:987a3976b9eb branch: 4.0 parent: 4712:3e68f49ecce1 user: Matt Lewis date: Tue Mar 08 09:35:50 2011 -0500 files: source/Makefile.gnu source/Makefile.wat source/be_runtime.c description:
- fix common control linking for MinGW / Watcom
- added prototype for MinGW winkbhit()
- fixes ticket 620
7. Comment by mattlewis
Mar 08, 2011
See: hg:euphoria/rev/7b99e09d0226
changeset: 4715:7b99e09d0226 tag: tip parent: 4713:a8c02d599466 parent: 4714:987a3976b9eb user: Matt Lewis date: Tue Mar 08 09:36:41 2011 -0500 files: source/Makefile.gnu source/Makefile.wat source/be_runtime.c description:
- merge fix for ticket 620 into the trunk