cant build with makefile.gcc

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.
umen
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Dec 21, 2007 12:49 pm

cant build with makefile.gcc

Post by umen »

Hello all
i fallow this tutorial :
http://www.wxwidgets.org/wiki/index.php ... etup_Guide

but im getting this error :

Code: Select all

$ mingw32-make  -f makefile.gcc BUILD=release SHARED=0 UNICODE=1 USE_ODBC=1
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
mingw32-make: *** [..\..\lib\gcc_lib] Error 258
im using :wxMSW-2.8.7 and $ gcc --version
gcc.exe (GCC) 3.4.5 (mingw special)
what im doing wrong here ?

thanks
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

if you compile with mingw32, you have to use mingw32-make within the Windows command prompt (cmd.exe) and not a shell.
Kind Regards,
Xavier Miller.
http://xaviermiller.be
umen
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Dec 21, 2007 12:49 pm

still have compilation error

Post by umen »

im getting from cmd.exe:

Code: Select all

I:\cpp\gui\wxMSW-2.8.7\build\msw>mingw32-make  -f makefile.gcc BUILD=release SHARED=0 UNICODE=1 USE_ODBC=1
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw32-make: *** [..\..\lib\gcc_lib] Error 2
what is wrong here?
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

are you sure ? I see "/usr/bin/sh": this is abnormal...
Kind Regards,
Xavier Miller.
http://xaviermiller.be
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

are you under linux ? In that case, you have to cross-compile wxWidgets
Kind Regards,
Xavier Miller.
http://xaviermiller.be
umen
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Dec 21, 2007 12:49 pm

Post by umen »

no im under win2k , using cmd.exe
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

but why do I see "/usr/bin/sh" ?

did you open the command prompt, and launch mingw32-make (and not make) ?
Kind Regards,
Xavier Miller.
http://xaviermiller.be
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

which version of mingw32-make do you use ?

version 3.81 is buggy, you'll need version 3.80

Code: Select all

mingw32-make -v
Kind Regards,
Xavier Miller.
http://xaviermiller.be
umen
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Dec 21, 2007 12:49 pm

Post by umen »

yes
i do start->run->cmd
then i cd I:\cpp\gui\wxMSW-2.8.7\build\msw
and run :

Code: Select all

mingw32-make -f makefile.gcc BUILD=debug SHARED=0 UNICODE=1 USE_ODBC=1 
or

Code: Select all

make -f makefile.gcc BUILD=debug SHARED=0 UNICODE=1 USE_ODBC=1
it gives me the same error :

Code: Select all

I:\cpp\gui\wxMSW-2.8.7\build\msw>mingw32-make -f makefile.gcc BUILD=debug SHARED=0 UNICODE=1 USE_ODBC=1
if not exist ..\..\lib\gcc_lib\mswud mkdir ..\..\lib\gcc_lib\mswud
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw32-make: *** [..\..\lib\gcc_lib\mswud] Error 2
what else can i try?
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

and the version of minwg32-make ?
Kind Regards,
Xavier Miller.
http://xaviermiller.be
umen
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Dec 21, 2007 12:49 pm

Post by umen »

im using :

Code: Select all

I:\cpp\gui\wxMSW-2.8.7\build\msw>make --version
GNU Make 3.81
ok i will try version 3.80
thanks
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

yes, this version calls sh in place of running shell (cmd.exe in your case). And the syntax of the makefile is for cmd.exe, not sh ;)
Kind Regards,
Xavier Miller.
http://xaviermiller.be
umen
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Dec 21, 2007 12:49 pm

Post by umen »

still after downloading version 3.80

Code: Select all

I:\cpp\gui\wxMSW-2.8.7\build\msw>mingw32-make --version
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
im getting the same erorr :

Code: Select all

I:\cpp\gui\wxMSW-2.8.7\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=0 UNICODE=1 USE_ODBC=1
if not exist ..\..\lib\gcc_lib\mswu mkdir ..\..\lib\gcc_lib\mswu
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw32-make: *** [..\..\lib\gcc_lib\mswu] Error 2
what the hell...
User avatar
alchemist
Experienced Solver
Experienced Solver
Posts: 80
Joined: Tue Sep 04, 2007 6:03 pm
Location: Lembeek - Belgium
Contact:

Post by alchemist »

Try to uninstall all the mingw stuff, and follow this HOWTO : http://wiki.codeblocks.org/index.php?ti ... _%28MSW%29

Thus, download only the strict necessary :
- gcc
- binutils
- mingw32-make
- win32api
- mingw-runtime

In your case, you don't need any POSIX-compatible shell (sh.exe).

Did you downloaded MSYS ? avoid it ;)
Kind Regards,
Xavier Miller.
http://xaviermiller.be
umen
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Dec 21, 2007 12:49 pm

Post by umen »

thanks folks for the help
cygwin was in the path .. this was the problem
Post Reply