User forums > Using Code::Blocks
Howto - Cross Compiling in Linux using MingW32
RagnarDa:
Hi guys!
I have tried to follow the guide http://wiki.codeblocks.org/index.php?title=Cross_Compiling_wxWidgets_Applications_on_Linux doing it multiple times over. I don't think I've missed anything. I created a new wxWidget project in C::B and have done nothing to it, except whats in the guide. When I compile the Debug/Release targets (for Linux) it compiles and runs fine, but my "WinRelease" - target generates the following build error:
--- Code: ---/home/christoffer/Projekt/wxLinux/wxLinuxApp.h|13|fel: wx/app.h: Filen eller katalogen finns inte|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|14|fel: wx/menu.h: Filen eller katalogen finns inte|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|15|fel: wx/statusbr.h: Filen eller katalogen finns inte|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|16|fel: wx/frame.h: Filen eller katalogen finns inte|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.cpp|14|fel: wx/image.h: Filen eller katalogen finns inte|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.h|16|error: expected class-name before ‘{’ token|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|20|error: expected class-name before ‘{’ token|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|23|error: expected `)' before ‘*’ token|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|29|error: ‘wxCommandEvent’ has not been declared|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|30|error: ‘wxCommandEvent’ has not been declared|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|40|error: ISO C++ forbids declaration of ‘wxStatusBar’ with no type|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|40|error: expected ‘;’ before ‘*’ token|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|43|error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|44|error: expected ‘;’ before ‘}’ token|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|44|error: expected `;' before ‘}’ token|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.cpp|17|error: expected constructor, destructor, or type conversion before ‘;’ token|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.cpp||In member function ‘virtual bool wxLinuxApp::OnInit()’:|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.cpp|23|error: ‘wxInitAllImageHandlers’ was not declared in this scope|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.cpp|26|error: no matching function for call to ‘wxLinuxFrame::wxLinuxFrame(int)’|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|20|note: candidates are: wxLinuxFrame::wxLinuxFrame()|
/home/christoffer/Projekt/wxLinux/wxLinuxMain.h|20|note: wxLinuxFrame::wxLinuxFrame(const wxLinuxFrame&)|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.cpp|27|error: ‘class wxLinuxFrame’ has no member named ‘Show’|
/home/christoffer/Projekt/wxLinux/wxLinuxApp.cpp|28|error: ‘SetTopWindow’ was not declared in this scope|
||=== Build finished: 20 errors, 0 warnings ===|
--- End code ---
"Filen eller katalogen finns inte" means "File or folder doesnt exist".
Im using Ubuntu 11.10, C::B 10.05, wxMSW-2.8.12 (wxWidget) and mingw32 is latest (from apt-get).
I've searched the forum the best I could but I'm new to this, and Linux in general...
EDIT:
When i execute wx-config --list i get:
--- Code: --- Default config is gtk2-unicode-release-2.8
Default config will be used for output
Alternate matches:
base-unicode-release-2.8
--- End code ---
But when i execute /usr/i586-mingw32msvc/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8 --list i get
--- Code: --- Default config is i586-mingw32msvc-msw-unicode-release-static-2.8
Default config will be used for output
Also available in /usr/i586-mingw32msvc:
i586-mingw32msvc-msw-unicode-static-2.9
--- End code ---
MortenMacFly:
--- Quote from: RagnarDa on March 23, 2012, 05:07:19 pm ---target generates the following build error:
--- End quote ---
Always the full build log, please...
RagnarDa:
--- Quote from: MortenMacFly on March 23, 2012, 05:51:50 pm ---Always the full build log, please...
--- End quote ---
Rgr.
--- Code: ----------------- Build: WinRelease in wxLinux ---------------
Linking executable: bin/Release/wxLinux.exe
obj/Release/wxLinuxApp.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End code ---
oBFusCATed:
This is not the full log.
See here for details: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
RagnarDa:
--- Quote from: oBFusCATed on March 23, 2012, 10:13:58 pm ---This is not the full log.
See here for details: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
--- End quote ---
OK.
--- Code: ----------------- Build: WinRelease in wxLinux ---------------
i586-mingw32msvc-g++ -L/usr/i586-mingw32msvc/lib/ -L/usr/i586-mingw32msvc/lib -o bin/Release/wxLinux.exe obj/Release/wxLinuxApp.o obj/Release/wxLinuxMain.o -s -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lodbc32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid
obj/Release/wxLinuxApp.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version