Configuring wxWindows for usage with 1586-mingw32 compiler

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
chakkaradeepcc
Earned some good credits
Earned some good credits
Posts: 116
Joined: Mon Nov 01, 2004 6:31 pm
Location: India
Contact:

Configuring wxWindows for usage with 1586-mingw32 compiler

Post by chakkaradeepcc »

hi all,

i am using wxWindows in Linux Platform. I downloaded the source code and just did ,
"./configure && make && make install"

but now i think i have to configure separately for producing executables using i586-mingw32 compiler...is it so?...i searched in the net and got this as the command....

"./configure --prefix=/usr/local/i386-mingw32 --host=i386-mingw32 --target=i386-mingw32 --with-msw --your_optional_switches"

when i run this,it gives this error,
"checking for i586-mingw32-gcc... i586-mingw32-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details."

so what is this error and how to rectify this?

with regards,
C.C.Chakkaradeep
chakkaradeepcc
Earned some good credits
Earned some good credits
Posts: 116
Joined: Mon Nov 01, 2004 6:31 pm
Location: India
Contact:

Post by chakkaradeepcc »

hi all,

i rectified the error, the configure statement was wrong for my system..that is am using i586-mingw32msvc-gcc compiler...so the correct configure statement i used is,

"./configure --prefix=/usr/local/i586-mingw32msvc --host=i586-mingw32msvc --target=i586-mingw32msvc --with-msw "

with regards,
C.C.Chakkaradeep
chakkaradeepcc
Earned some good credits
Earned some good credits
Posts: 116
Joined: Mon Nov 01, 2004 6:31 pm
Location: India
Contact:

Post by chakkaradeepcc »

hi all,

i installed wxWindows with the command in previous post....now i want to compile wxWindows to produce ".exe" as output file.Am using kdevelop as editor...and then i have added CXX=i586-mingw32-msvc-gcc as extra flags....while producing configure file,kdevelop checks for availability for producing exe files and it does shows yes with "a.exe"...

the problem is when i 'make' , the following error is thrown..
/******************starting of error message*****************************/
[root@localhost sample]# make
Making all in src
make[1]: Entering directory `/home/sample/src'
if i586-mingw32msvc-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"sample\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -Wall -g -fexceptions -I/usr/local/lib/wx/include/gtk-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -g -fexceptions -Wall -g -fexceptions -I/usr/local/lib/wx/include/gtk-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -MT sample.o -MD -MP -MF ".deps/sample.Tpo" -c -o sample.o sample.cpp; \
then mv -f ".deps/sample.Tpo" ".deps/sample.Po"; else rm -f ".deps/sample.Tpo"; exit 1; fi
In file included from /usr/local/mingw/include/wx/wx.h:15,
from sample.cpp:20:
/usr/local/mingw/include/wx/defs.h:2332: error: conflicting types for `typedef
struct GtkWidget*WXWidget'
/usr/local/mingw/include/wx/defs.h:2159: error: previous declaration as `
typedef WXHWND WXWidget'
In file included from /usr/local/mingw/include/wx/window.h:1151,
from /usr/local/mingw/include/wx/app.h:23,
from /usr/local/mingw/include/wx/wx.h:24,
from sample.cpp:20:
/usr/local/mingw/include/wx/msw/window.h: In member function `virtual
GtkWidget* wxWindow::GetHandle() const':
/usr/local/mingw/include/wx/msw/window.h:166: error: invalid conversion from `
WXHWND' to `GtkWidget*'
In file included from /usr/local/mingw/include/wx/wx.h:67,
from sample.cpp:20:
/usr/local/mingw/include/wx/scrolwin.h:213:33: wx/gtk/scrolwin.h: No such file or directory
In file included from /usr/local/mingw/include/wx/wx.h:68,
from sample.cpp:20:
/usr/local/mingw/include/wx/dirdlg.h:47:40: wx/generic/dirdlgg.h: No such file or directory
make[1]: *** [sample.o] Error 1
make[1]: Leaving directory `/home/sample/src'
make: *** [all-recursive] Error 1
/******************ending of error message*****************************/

pls do give me a solutiong for this..is my approach is correct to cross compile??..

with regards,
C.C.Chakkaradeep
Post Reply