Pulling my hair out...

BlitzMax Forums/Brucey's Modules/Pulling my hair out...

Russell(Posted 2011) [#1]
Ok, it seems there is no one correct way to install mingw so that it can both compile modules AND programs without error (for me anyway). Also, I've noticed that there are many differing directions on how to do it (what works for Windows Xp doesn't seem to work for Windows 7, or, what works for the 5.1.3 version of mingw doesn't seem to work for the latest, etc).

Is there anyone out there who is running Windows 7 x64 and can successfully compile all modules (especially brucey's modules) AND all of the example programs? If so, please tell me what your set up is!

Thanks in advance!
Russell


H&K(Posted 2011) [#2]
I can, I think. (well none I have compiled failed)

And I have win 7 64 bit

What I do is use Blide, and let it do it for me. Obviously I use the versions of things Ziggy recomends, and Modual Compilation just stopped being a problem.

Last edited 2011


Russell(Posted 2011) [#3]
H&K, I usually can compile modules with no problems, but then programs don't compile correctly :(

I started over: I followed Mark's directions exactly, EXCEPT, I didn't use minGW 5.1.3, but the latest one and selected C, C++ and developer tools (The options he recommends do not exist in the latest version).

I did NOT copy ar and ld this time because Mark does not mention them. Nor did I add the GCC_EXEC_PREFIX environment variable. Now, all of the default modules compile, including MaxGUI, but I get compiler warnings such as:

Warning: .drectve `-aligncomm:"_joyhandle",5' unrecognized
Warning: .drectve `-aligncomm:"_ReadStream",2 ' unrecognized
Warning: .drectve `-aligncomm:"_WriteStream",2 ' unrecognized
Warning: .drectve `-aligncomm:"_ccinfo",5 ' unrecognized
Warning: .drectve `-aligncomm:"_jerr",5' unrecognized
Warning: .drectve `-aligncomm:"_stdin_",2 ' unrecognized
Warning: .drectve `-aligncomm:"_stdout_",2 ' unrecognized
Warning: .drectve `-aligncomm:"_stderr_",2' unrecognized
Warning: .drectve `-aligncomm:"_bbGCStackTop",2 ' unrecognized
Warning: .drectve `-aligncomm:"__bbusew",2' unrecognized
Warning: .drectve `-aligncomm:"__bbNeedsLock",2 ' unrecognized
Warning: .drectve `-aligncomm:"__bbLock",2' unrecognized


but the programs themselves run fine.

So, I started adding brucey's modules one at a time.

First, I added box2d.mod, compiled with no problem, example programs run, but give similar warnings as above.

Next, I added Cairo.mod, compiled with no problem, example programs run, also with warnings like above.

Next, Freeimage.mod, compiled without problems, BUT test_01.bmx gives a few warning lines like above, then LOTS of 'undefined reference to `_Unwind_Resume'' errors, such as:

C:/BlitzMax/mod/bah.mod/freeimage.mod/freeimage.debug.win32.x86.a(Plugin.cpp.debug.win32.x86.o):Plugin.cpp:(.text+0x4a8): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/bah.mod/freeimage.mod/freeimage.debug.win32.x86.a(Plugin.cpp.debug.win32.x86.o):Plugin.cpp:(.text+0xf72): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/bah.mod/freeimage.mod/freeimage.debug.win32.x86.a(Plugin.cpp.debug.win32.x86.o):Plugin.cpp:(.text$_ZNSt8_Rb_treeIiSt4pairIKiP10PluginNodeESt10_Select1stIS4_ESt4lessIiESaIS4_EED1Ev[__ZNSt8_Rb_treeIiSt4pairIKiP10PluginNodeESt10_Select1stIS4_ESt4lessIiESaIS4_EED1Ev]+0x45): undefined reference to `_Unwind_Resume'
C:/BlitzMax/mod/bah.mod/freeimage.mod/freeimage.debug.win32.x86.a(Plugin.cpp.debug.win32.x86.o):Plugin.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'

...etc


Then, libtcod.mod, compiled without errors, but the FIRST time I ran the example, example_01.bmx, I got an EXCEPTION_VIOLATION error. I compiled again and it ran fine (but with the warnings like before). Weird.
[EDIT: Actually, this one randomly either runs fine or gives an EXCEPTION_ACCESS_VIOLATION]

Sfxr.mod, compiled fine, warnings, but examples work fine.

Speech.mod same as above

wx.mod same as above (with the changes to wxglmax2d.bmx, wxmax2d.bmx and inserting new.h - from an older version of minGW, strangely not found in the newest one - into MinGW/include).

Ah, here's my first error on module compilation this time around: Magick.mod gives the following error:

In file included from C:/BlitzMax/mod/pub.mod/libjpeg.mod/jpeglib.h:26:0,
from C:/BlitzMax/mod/bah.mod/magick.mod/src/coders/jpeg.c:114:
C:/BlitzMax/mod/pub.mod/libjpeg.mod/jmorecfg.h:140:15: error: conflicting types for 'UINT8'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/basetsd.h:56:23: note: previous declaration of 'UINT8' was here
C:/BlitzMax/mod/pub.mod/libjpeg.mod/jmorecfg.h:149:22: error: conflicting types for 'UINT16'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/basetsd.h:57:24: note: previous declaration of 'UINT16' was here
Build Error: failed to compile C:/BlitzMax/mod/bah.mod/magick.mod/src/coders/jpeg.c
Process complete


So anyways, the one module I really would like to get working is freeimage, just will not work no matter what I try and every program I compile gives those weird warnings about '.drectve `-aligncomm:"_stdin_",2 ' unrecognized' etc.

I really wish the BlitxMax installation program would take care of minGW setup, so that fewer people would have these problems.

Thanks for everyone's help.

Russell

Last edited 2011