tags:

views:

965

answers:

3

If I compile this QT c++ program in SuSE Linux

#include <iostream> 
using namespace std; 

int main () 
{ 
cout << "Hello World!"; 
return 0; 
}

When I type

i386-mingw32-g++ helloworld.cpp

I get the following error

i386-mingw32-g++: error trying to exec 'cc1plus': execvp: No such file or directory

Is this because MinGW package which i installed contains only gcc in it.. hence i downloaded gcc-g++-3.4.5.rpm package and just copy pasted i386-mingw32-g++ and cc1plus executable along with C++ include files.

Pls reply. Thanking You

+1  A: 

Ugh. The cc1plus in gcc-g++-3.4.5.rpm is not for mingw32. You need the one for your distro.

e.g. for Fedora 10, use http://sourceforge.net/projects/outmodedbonsai/files/Mingw%20Cross-compiler/mingw-1.10-1.fc10.x86_64.rpm

J-16 SDiZ
Thanks for the reply...If it is possible can u pls send me the link for SuSE Linux Distro of mingw-g++.Pls do reply
sorry, I can't find any rpm for suse with c++. You may try the "compile from source" way in http://www.mingw.org/wiki/LinuxCrossMinGW
J-16 SDiZ
A: 

suse cross-compile toolchain is here. http://download.opensuse.org/repositories/CrossToolchain%3A/mingw/

A: 

Quoting from here:

It means that your shell could find the g++ frontend of the GNU compiler but that frontend couldn't find cc1plus, the actual C++ compiler; it could find cpp, the preprocessor, it already ran. Go to the directory where the g++ frontend is stored (type: "which g++") and look for the file cc1plus in that same directory or a sub- directory thereof. If it isn't there your compiler installation is broken; if it is there some configuration of it went berzerk.


Also, have a look at this thread.

Lazer