You are not logged in.

#1 2009-01-19 19:10:11

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Code::Blocks Mingw32 Compiler doesn't compile file

When I tried to compile one of my projects, it gave me this:

Compiling: /home/shadowkyogre/C++ Stuff/If/If.cpp
/bin/sh: i486-mingw32-cpp   -I/usr/i486-mingw32/include  -c "/home/shadowkyogre/C++ Stuff/If/If.cpp" -o "/home/shadowkyogre/C++ Stuff/If/If.o": No such file or directory
Process terminated with status 127 (0 minutes, 0 seconds)

Problem is that there IS an If.o and it still does not see it.

When I run i486-mingw32-cpp from the command line, it shows the source code of the file, but that's about it.

With the -c option, GNU GCC works fine while MingW32 does not. W/o the -c option, MingW32 gets the above error, while GNU GCC fails to complete the compile.

Last edited by ShadowKyogre (2009-01-19 22:37:44)


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

#2 2009-01-21 00:51:39

Killa B
Member
From: United States
Registered: 2008-10-28
Posts: 42
Website

Re: Code::Blocks Mingw32 Compiler doesn't compile file

Are you just trying to compile "If.cpp" into an object file?

If so, you don't need the -o option.

i486-mingw32-cpp -I/usr/i486-mingw32/include  -c "/home/shadowkyogre/C++ Stuff/If/If.cpp"

Should make "If.o" for you.

-----

I'm not sure how familiar you are with GCC, so forgive me if this next part insults your intelligence.

If "If.cpp" is the only source file, then do:

i486-mingw32-cpp -I/usr/i486-mingw32/include  -c "/home/shadowkyogre/C++ Stuff/If/If.cpp"
i486-mingw32-cpp -I/usr/i486-mingw32/include  -o "/home/shadowkyogre/C++ Stuff/If/If" "/home/shadowkyogre/C++ Stuff/If/If.o"

To produce the executable "If.exe" in that directory.

Personally I'd do it all from the directory the source is in. I also don't know what the hell "i486-mingw32-cpp" is (though it is on my system o.O), so I'd do:

i486-mingw32-g++ -I/usr/i486-mingw32/include  -c If.cpp
i486-mingw32-g++ -I/usr/i486-mingw32/include  -o If If.o

Offline

#3 2009-01-21 01:27:37

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Re: Code::Blocks Mingw32 Compiler doesn't compile file

Oh. I apparently didn't see the g++. Now it compiles (yays!). Now I'm wondering something...when I compile something with the GNU compiler, I just want it to use Konsole. However, when I build the program for windows, I want it to do the program in Konsole by doing "wine If.exe". How do I do that?


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

#4 2009-01-21 02:29:25

Killa B
Member
From: United States
Registered: 2008-10-28
Posts: 42
Website

Re: Code::Blocks Mingw32 Compiler doesn't compile file

You can't do it in Konsole, as far as I know (or any decent terminal for that matter).

You can use "wineconsole cmd", though, which will give you (a less functional version of) the Windows Command Prompt

Offline

#5 2009-01-21 02:45:22

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Re: Code::Blocks Mingw32 Compiler doesn't compile file

I actually did do that in Konsole and it worked (in the folder, "wine If.exe"), which is why I'm asking. Is there a way to set a different console to user for each compiler?

Also, when compiling a Qt4 app for Windows, this error pops up:

/usr/include/QtGui/qwindowdefs.h|135|error: QtGui/qwindowdefs_win.h: No such file or directory|

I see qwindowdefs.h...but not qwindowdefs_win.h.

Last edited by ShadowKyogre (2009-01-21 03:11:11)


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

#6 2009-01-21 21:07:43

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: Code::Blocks Mingw32 Compiler doesn't compile file

It is using your system (i.e. Linux) qt installation. For cross-compiling you need a second installation in /usr/i486-mingw32/, that is you have to compile and install qt with/for mingw.

Offline

#7 2009-01-22 05:39:19

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Re: Code::Blocks Mingw32 Compiler doesn't compile file

In other words, I have to make a Qt packet that's for cross-compiling.


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

Board footer

Powered by FluxBB