I use Lubuntu 14.04 LTS AMD64.
In this way I compiled wxWidgets 3.0.1 with the help of that tutorial (I changed global compiler settings, not the target ones - my target to Win name is Windows ):
/home/tomasz/Pobrane/src/wxWidgets-3.0.1/configure prefix=/usr/local/i386-mingw32 --host=i386-mingw32 --build=x86_64-linux --enable-unicode --disable-shared --disable-debug --with-msw --enable-stl
Then i used make -j3 and install make. Everything - OK. However, there is the problem with linking:
obj/Windows/main.o:main.cpp:(.text+0x23): undefined reference to `wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)'
obj/Windows/main.o:main.cpp:(.text+0x81): undefined reference to wxAppConsoleBase::CheckBuildOptions(char const*, char const*)'
I think that the problem is connected with wx/app.h because when I disabled it, there weren't errors like the ones.
The whole log:
-------------- Build: Windows in Symulator Kostek (compiler: MingW32 Compiler)---------------
i386-mingw32-g++ -I/usr/local/i386-mingw32/include/ -c "/home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.cpp" -o obj/Windows/panels.o
i386-mingw32-g++ -L/usr/local/i386-mingw32/lib/ -o "bin/Windows/Symulator Kostek.exe" obj/Windows/main.o obj/Windows/main_frame.o obj/Windows/panels.o
In file included from /usr/local/i386-mingw32/include/wx/msw/gccpriv.h:61:0,
from /usr/local/i386-mingw32/include/wx/platform.h:456,
from /usr/local/i386-mingw32/include/wx/defs.h:27,
from /usr/local/i386-mingw32/include/wx/event.h:14,
from /usr/local/i386-mingw32/include/wx/window.h:18,
from /usr/local/i386-mingw32/include/wx/panel.h:19,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.h:4,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.cpp:1:
/usr/local/i386-mingw32/include/w32api.h:27:2: warning: #warning WARNING - The w32api.h header file is deprecated and will be removed. [-Wcpp]
#warning WARNING - The w32api.h header file is deprecated and will be removed.
^
obj/Windows/main.o:main.cpp:(.text+0x23): undefined reference to `wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)'
obj/Windows/main.o:main.cpp:(.text+0x81): undefined reference to `wxAppConsoleBase::CheckBuildOptions(char const*, char const*)'
/usr/local/lib/gcc/i386-mingw32/4.9.1/../../../../i386-mingw32/bin/ld: obj/Windows/main.o: zły adres przemieszczenia 0xf w sekcji `.text$_ZN8wxString7ImplStrEPKw[__ZN8wxString7ImplStrEPKw]'
/usr/local/lib/gcc/i386-mingw32/4.9.1/../../../../i386-mingw32/bin/ld: final link failed: Nieprawidłowa operacja
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 4 second(s))
2 error(s), 1 warning(s) (0 minute(s), 4 second(s))
And when I try to use C++11 (the reason why I compiled MinGW manually because of the old compiler in repository):
/usr/local/i386-mingw32/include/io.h:301:14: error: ‘off64_t’ does not name a type
/usr/local/i386-mingw32/include/io.h:302:14: error: ‘off64_t’ does not name a type
/usr/local/i386-mingw32/include/wx/wxcrtbase.h:680:68: error: ‘wcsdup’ was not declared in this scope
And the whole log:
-------------- Build: Windows in Symulator Kostek (compiler: MingW32 Compiler)---------------
i386-mingw32-g++ -std=c++11 -I/usr/local/i386-mingw32/include/ -c "/home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.cpp" -o obj/Windows/panels.o
i386-mingw32-g++ -L/usr/local/i386-mingw32/lib/ -o "bin/Windows/Symulator Kostek.exe" obj/Windows/main.o obj/Windows/main_frame.o obj/Windows/panels.o
In file included from /usr/local/i386-mingw32/include/wx/msw/gccpriv.h:61:0,
from /usr/local/i386-mingw32/include/wx/platform.h:456,
from /usr/local/i386-mingw32/include/wx/defs.h:27,
from /usr/local/i386-mingw32/include/wx/event.h:14,
from /usr/local/i386-mingw32/include/wx/window.h:18,
from /usr/local/i386-mingw32/include/wx/panel.h:19,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.h:4,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.cpp:1:
/usr/local/i386-mingw32/include/w32api.h:27:2: warning: #warning WARNING - The w32api.h header file is deprecated and will be removed. [-Wcpp]
#warning WARNING - The w32api.h header file is deprecated and will be removed.
^
In file included from /usr/local/i386-mingw32/include/wx/wxcrtbase.h:41:0,
from /usr/local/i386-mingw32/include/wx/string.h:45,
from /usr/local/i386-mingw32/include/wx/memory.h:15,
from /usr/local/i386-mingw32/include/wx/object.h:19,
from /usr/local/i386-mingw32/include/wx/event.h:16,
from /usr/local/i386-mingw32/include/wx/window.h:18,
from /usr/local/i386-mingw32/include/wx/panel.h:19,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.h:4,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.cpp:1:
/usr/local/i386-mingw32/include/io.h:301:14: error: ‘off64_t’ does not name a type
__CRT_INLINE off64_t lseek64 (int, off64_t, int);
^
/usr/local/i386-mingw32/include/io.h:302:14: error: ‘off64_t’ does not name a type
__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
^
In file included from /usr/local/i386-mingw32/include/wx/string.h:45:0,
from /usr/local/i386-mingw32/include/wx/memory.h:15,
from /usr/local/i386-mingw32/include/wx/object.h:19,
from /usr/local/i386-mingw32/include/wx/event.h:16,
from /usr/local/i386-mingw32/include/wx/window.h:18,
from /usr/local/i386-mingw32/include/wx/panel.h:19,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.h:4,
from /home/tomasz/Dropbox/Programy/Linux/wxWidgets/Symulator Kostek/panels.cpp:1:
/usr/local/i386-mingw32/include/wx/wxcrtbase.h: In function ‘wchar_t* wxStrdup(const wchar_t*)’:
/usr/local/i386-mingw32/include/wx/wxcrtbase.h:680:68: error: ‘wcsdup’ was not declared in this scope
inline wchar_t* wxStrdup(const wchar_t *s) { return wxCRT_StrdupW(s); }
^
Process terminated with status 1 (0 minute(s), 5 second(s))
3 error(s), 1 warning(s) (0 minute(s), 5 second(s))