User forums > Using Code::Blocks
Howto - Cross Compiling in Linux using MingW32
usenet.tech.talk:
Hi All,
This post seemed like it would answer my quest for (relatively) cross compiler testing. Under Ubuntu, I followed all the steps except those related to insight (the html link to the binary is broken) and here's what I get:
-------------- Build: Debug in testing_mingw ---------------
Compiling: cpp-projects/testing_mingw/main.cpp
Assembler messages:
Fatal error: can't create obj/Debug/cpp-projects/testing_mingw/main.o: No such file or directory
Process terminated with status 1 (0 minutes, 3 seconds)
0 errors, 0 warnings
Is insight necessary to compile? I thought it was a debugger.
My second question is this : I'm actually on a Mac machine and use Ubuntu via a virtual machine. It would be simpler to try the above on Mac directly. Has anyone tried it?
Jenna:
First turn on full commandline logging : change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" to see what is sent to the compiler.
usenet.tech.talk:
Thanks.
First, by trying to compile I get
Can't create object output directory obj/Debug/cpp-projects/testing_mingw.
Then, after clicking on OK,
Can't create output directory bin/Debug/
Then, after clicking on OK,
-------------- Build: Debug in testing_mingw ---------------
i586-mingw32msvc-g++ -Wall -fexceptions -g -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__ -I/usr/i586-mingw32msvc/include -c cpp-projects/testing_mingw/main.cpp -o obj/Debug/cpp-projects/testing_mingw/main.o
Assembler messages:
Fatal error: can't create obj/Debug/cpp-projects/testing_mingw/main.o: No such file or directory
Process terminated with status 1 (2 minutes, 5 seconds)
0 errors, 0 warnings
Jenna:
Did you check the access-rights for the directories, where the new directories should be created ?
usenet.tech.talk:
>Did you check the access-rights for the directories, where the new directories should be created ?
Thanks for following up on this.
Are you talking about the project directories or the installation directory? The project directories are somewhere in ~ where other projects were created with the default compiler w/o problem. As for installation, it's in an auto-detected path : Auto-detected installation path of "MingW32 Compiler" in "/usr".
By the way, I use Win7 (see signature for detail). Is this consequential for the defines below (Win95)?
The whole set up is summarized here:
#defines
WINVER=0x0400
__WIN95__
__GNUWIN32__
STRICT
HAVE_W32API_H
__WXMSW__
__WINDOWS__
Other linker options
-lstdc++
-lgcc
-lodbc32
-lwsock32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lctl3d32
-lodbc32
-ladvapi32
-lodbc32
-lwsock32
-lopengl32
-lglu32
-lole32
-loleaut32
-luuid
Search directories
Compiler: /usr/i586-mingw32msvc/include
Linker: /usr/i586-mingw32msvc/lib
Resource compiler: /usr/i586-mingw32msvc/include
Compiler's installation directory: /usr
C Compiler : i586-mingw32msvc-gcc
C++ Compiler: i586-mingw32msvc-g++
Linker for dyn libs: i586-mingw32msvc-g++
Linker for static libs: i586-mingw32msvc-ar
Debugger: i586-mingw32msvc-gdb
Resource compiler: NA
Make program : make
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version