Error compiling with MinGW and msys1.0

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
dedesite
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Aug 02, 2006 11:06 am

Error compiling with MinGW and msys1.0

Post by dedesite » Wed Aug 02, 2006 11:17 am

Hi,
I know that a lot of people have my problem, but I didn't find a good solution, so I post a new thread on that :

- I'm using MinGW gcc 3.4.5
- I have msys 1.0.11 installed on my computer
- I have copy the make.exe file of msys/bin into mingw/bin folder and rename it "mingw32-make.exe".
- I have add to configure.gcc -DNO_GCC_PRAGMA to CXXFLAGS.
- I have copy setup.h into inclue/wx
- I have set my environement variable for wxWidgets and MinGW and msys

And when I try to compile with this command line :

mingw32-make -f makefile.gcc BUILD=debug
I've got this error (with cmd or msys) :
if not exist gcc_mswd mkdir gcc_mswd
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: [gcc_mswd] Error 2 (ignored)
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [..\..\lib\gcc_lib] Error 2
I really don't understand what append.

Thanks for helping me.

Dede

P.S : for information, I have the SDK of wxWidgets install on my machine, does the problem come from that?

P.S.2 : Sorry for my english

netsql
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Aug 03, 2006 8:04 pm

Post by netsql » Thu Aug 03, 2006 8:06 pm

(I have same exeact error and no solution. help)

qgranfor
Experienced Solver
Experienced Solver
Posts: 89
Joined: Sun Aug 29, 2004 7:32 pm
Location: ND...USA
Contact:

Post by qgranfor » Thu Aug 03, 2006 9:50 pm

I had this issue the other day. I reinstalled msys into a directory without spaces in it (it defaults to Program Files if I recall correctly). Then it worked for me.

netsql
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Aug 03, 2006 8:04 pm

Post by netsql » Thu Aug 03, 2006 11:33 pm

Cygwin w/ configure works!

Question 2: If I compile an app w/ cygwin gcc, can the users run it in windows w/o cygwin installed?
.V

dedesite
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Aug 02, 2006 11:06 am

Post by dedesite » Mon Aug 07, 2006 8:48 am

I had this issue the other day. I reinstalled msys into a directory without spaces in it (it defaults to Program Files if I recall correctly). Then it worked for me.
I've already reinstall msys in a folder without space but it doesn't work.
Cygwin w/ configure works!
I will try with msys and configure!

Regards,

dede

EDIT : I use code blocks, is there a .cbp file for compiling wxWidgets without problems?

tiwag
Earned some good credits
Earned some good credits
Posts: 123
Joined: Tue Dec 21, 2004 8:51 pm
Location: Austria

Post by tiwag » Mon Aug 07, 2006 9:01 am

this cannot work, you try to make a win32-makefile,
with msys you can only make unix-makefiles.

if you download wxMSW,
you have in your wx\build\msw folder
a makefile.gcc which builds only with the mingw32-make.exe

deinstall (or do not use) msys,
download the mingw make V3.80,
install it for example in C:\MinGW\

then generate a batchfile in your wx\ folder which contains i.e.

build_monolithic_unicode_dll_release.bat

Code: Select all

PATH=C:\MinGW\bin;%PATH%
cd build\msw
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=1 VENDOR=wx263
(edit the options as you need,
btw. the above options are needed if you
want to build your own CodeBlocks from sources from svn,
if you build the dll version, it is recommended to use in the VENDOR string
some information about the subversion of wx, because otherwise you get
identical named dll files for wx2.6.2, wx2.6.3 etc...)

and run the batchfile.

AND !!! don't copy any setup.h from anywhere to anywhere !!!!
or you will come into troubles later on, when you have several
different builds of your wx libraries in parallel installed.

always give the compiler the path to the setup.h which you want to use
for your actual project, so that it can find the right setup.h file.
-tiwag

dedesite
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Aug 02, 2006 11:06 am

Post by dedesite » Mon Aug 07, 2006 11:27 am

Hi,

Thanks for your repply tiwag!! :D

Ok for the make, but I can't find mingw make V3.80, it's not on MinGw web site and I can't find it with google.
AND !!! don't copy any setup.h from anywhere to anywhere !!!!
or you will come into troubles later on, when you have several
different builds of your wx libraries in parallel installed.
I read that on a post of this forum but I can't find it anymore.

Anyway, when I'll find the make for minGW, it will be good.

greetings,

dede

tiwag
Earned some good credits
Earned some good credits
Posts: 123
Joined: Tue Dec 21, 2004 8:51 pm
Location: Austria

Post by tiwag » Mon Aug 07, 2006 1:01 pm

dedesite wrote:Hi,
... I can't find mingw make V3.80, it's not on MinGw web site ...
it is there - you need new glasses :P

http://prdownloads.sf.net/mingw/mingw32 ... e?download
-tiwag

dedesite
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Aug 02, 2006 11:06 am

Post by dedesite » Mon Aug 07, 2006 1:28 pm

Thanks, men. I'll try to compile and I'll edit my post, if it's OK.
In did, I'll go to the optician :D .

EDIT :

Unfortunatly, I have this error when I try to compil with your bat file. :(
if not exist gcc_mswudll mkdir gcc_mswudll
/bin/sh: -c: line 2: syntax error: unexpected end of file
mingw32-make: [gcc_mswudll] Error 258 (ignored)
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
/bin/sh: -c: line 2: syntax error: unexpected end of file
mingw32-make: *** [..\..\lib\gcc_dll] Error 258
greetings,

dede

tiwag
Earned some good credits
Earned some good credits
Posts: 123
Joined: Tue Dec 21, 2004 8:51 pm
Location: Austria

Post by tiwag » Mon Aug 07, 2006 2:49 pm

dedesite wrote: Unfortunatly, I have this error when I try to compil with your bat file. :(
it works, just be sure, that you don't use msys !

deinstall msys (or delete all folders)
deinstall MinGw (or delete all folders)
clean your PATH variable
install MinGW from the installer 5.0.3
http://prdownloads.sourceforge.net/ming ... e?download
select Download & install,
then select candidate package
then add g++ and MinGW make
to the already selected "MinGW base tools"

then install them to
C:\MinGW



are you shure, you have installed the wxMSW package ?
http://prdownloads.sourceforge.net/wxwi ... .6.3-1.zip
ftp://biolpc22.york.ac.uk/pub/2.6.3/wxW ... atch-2.zip


good luck
-tiwag

dedesite
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Aug 02, 2006 11:06 am

Post by dedesite » Mon Aug 07, 2006 4:24 pm

Hi,

I do not have MinGW 5.0.3 installed because I've made a "special" install of dependancies for compile OGRE (graphical engine) fine. So, I'm not sure if the 5.0.3 version is compatible.

I didn't install the patch, it's maybe for that...

Anyway, thanks for your help!

EDIT : With the patch and without msys, it compiles!!!!!
I hope that there will not be compil error!
Thanks!!

EDIT2 : It has compil without problem, I'll try to compile what I want and we will see. I think it's good now! :P

greetings,

dede

Blubber2063
In need of some credit
In need of some credit
Posts: 3
Joined: Tue Aug 08, 2006 10:27 am

Problems compiling the Hello World Sample

Post by Blubber2063 » Tue Aug 08, 2006 10:46 am

Problems compiling the Hello World Sample:
My Makefile:
all: test;

test: test.o
g++ -o test.exe `wxWidgets/wx-config --libs --gl-libs` -lGLEW -mwindows

test.o: test.cpp
g++ -c test.cpp -Wall `wxWidgets/wx-config --cppflags` -mwindows

But the linker is missing : libwx_msw_gl-2.6.a
I have build the wxWidgets 2.6.3 with mysis configure and make,
and the it was described here, with the Makefile from the build/msw directory,
but i'm always missing the lib, by compiling the sample.

sthayashi
Earned a small fee
Earned a small fee
Posts: 16
Joined: Fri Aug 11, 2006 7:47 pm

Post by sthayashi » Fri Aug 11, 2006 7:52 pm

What I discovered in my many attempts at compiling wxWidgets is that you CANNOT have MSYS\1.0\bin in the $PATH. This alone will screw up the compile.

(this is just for the Makefile.gcc, if you generate your builds using the configure script, then you can safely ignore the above.

Post Reply