Author Topic: cannot exec cc1plus???  (Read 26957 times)

0ctavarium

  • Guest
cannot exec cc1plus???
« on: July 01, 2006, 09:35:22 pm »
Switching to target: default
Compiling: main.cpp
mingw32-g++.exe: installation problem, cannot exec `cc1plus': No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

This is an error I get whenever I try to compile the simple, premade "hello world" console app. I mean, that should compile, right?
I thought everything was installed correctly... I installed the version with the built-in minGW compiler. What am I doing wrong?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5514
Re: cannot exec cc1plus???
« Reply #1 on: July 01, 2006, 09:37:47 pm »
maybe something with the path ?

But may I suggest you forget about RC2 and try out one of our latest nightly builds ?
You can find more information here :

http://forums.codeblocks.org/index.php?board=20.0

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: cannot exec cc1plus???
« Reply #2 on: July 03, 2006, 12:06:12 am »
Hello,

and I would also suggest you to download and install a separate MinGW (may be with the new MinGW 5.0.3 installer :)). I would advice to install it under c:\ (especially if you would like to try out Ceniza's GCC 4.11 :)).

Best wishes,
Michael

Offline Unevolved

  • Single posting newcomer
  • *
  • Posts: 3
Re: cannot exec cc1plus???
« Reply #3 on: April 09, 2008, 07:31:56 am »
I'm having the exact same problem as the OP, but doing a nightly build did nothing, the problem still persists.

Please bear with me, as you can tell I'm new at this.  This is my first foray into programming, so forgive me if I don't catch everything the first time around.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: cannot exec cc1plus???
« Reply #4 on: April 09, 2008, 03:39:12 pm »
 * Are you running Windows Vista?
 * If so, are you using a version of MinGW/GCC without the Vista fix? (The version bundled with C::B 8.02 includes the Vista fix.)
 * If not, did you install MinGW yourself and forget the g++ package?
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline Unevolved

  • Single posting newcomer
  • *
  • Posts: 3
Re: cannot exec cc1plus???
« Reply #5 on: April 09, 2008, 03:54:24 pm »
Yeah, I'm running 32-bit Vista Ultimate.  I installed the C::B version with MinGW bundled with it.  Just in case, though, I reinstalled MinGW and made sure the g++ package was installed, and that didn't fix it.

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: cannot exec cc1plus???
« Reply #6 on: April 09, 2008, 07:25:06 pm »
First to the OP.  Choose 'run' from the start menu and enter "SystemPropertiesAdvanced.exe" and edit your environment variables.  At the beginning of your PATH variable add:

%GCC_ROOT_PATH%\bin;%GCC_ROOT_PATH%\libexec\gcc\mingw32\3.4.5;

And then make sure you create a new variable named GCC_ROOT_PATH and set it to your mingw root directory.  Likely to be one of:

c:\mingw
OR
c:\program files\codeblocks\mingw

This will make sure that the gcc helper executables (cc1.exe,cc1plus.exe,collect.exe) are available to the system.


That out of the way:
* Are you running Windows Vista?
 * If so, are you using a version of MinGW/GCC without the Vista fix? (The version bundled with C::B 8.02 includes the Vista fix.)
 * If not, did you install MinGW yourself and forget the g++ package?

I am also attempting to get C::B/mingw working on a Vista system.  I manually installed mingw using all the patch2 files from mingw.org.  Specifically I downloaded each of:

gcc-core-3.4.5-20060117-2.tar.gz
gcc-g++-3.4.5-20060117-2.tar.gz
binutils-2.18.50-20080109-2.tar.gz
mingw32-make-3.81-20080326.tar.gz
mingw-runtime-3.14.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.11.tar.gz

and unzipped them to c:\dev\mingw.  I am under the assumption (after reading the update log you posted at the mingw.org site) that all packages listed contain the latest vista fixes.  At this point the compiler works fine but I fail at linking with:

Code
Compiling: main.cpp
Linking console executable: bin\Release\blah.exe
ld: crt2.o: No such file: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

code
Quote
#include <iostream>

using namespace std;

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

To my knowledge that file should be visible to the environment. 

Compiler Search Directories:
Code
C:\dev\MinGW\include
C:\dev\MinGW\include\c++\3.4.5
C:\dev\MinGW\include\c++\3.4.5\backward
C:\dev\MinGW\include\c++\3.4.5\mingw32
C:\dev\MinGW\lib\gcc\mingw32\3.4.5\include

Linker Search Directories:
Code
C:\dev\MinGW\lib
C:\dev\MinGW\lib\gcc\mingw32\3.4.5

the file in question is located at   C:\dev\MinGW\lib\crt2.o  which is inside the first entry in my linker search dirs.  I am a bit confused about what could be causing the problem and after reading thru the few entries i could locate on the forums (searching for crt2.0) and even googling (which had some links to DevC++ people with same problem) the only advice I found included adding paths that i've already got set.

When originally (quite awhile back) setting this up to work on my WinXP system I remember adding  %GCC_ROOT_PATH%\mingw32\bin  to my path in addition to just  /bin,  but looking at the directory layout on vista all files in mingw32/bin are already located in  /bin so I dont see that as possibly helping.

Any suggestions?   Any additional faqs/resources i should browse?  I've already read http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_Vista and even updated it (it forgot one entry for compiler includes) and Im now officially out of options.

Seronis


edit:

On a side note, on a friends vista system shortly after the 8.02 release I did get C::B installed using the prepackaged mingw and the only setup i remember doing there to get it to work was the environment variables and search directories.  Any chance that last nights vista automatic updates broke vistas compatibility with mingw?



« Last Edit: April 09, 2008, 07:30:14 pm by Seronis »

Offline Unevolved

  • Single posting newcomer
  • *
  • Posts: 3
Re: cannot exec cc1plus???
« Reply #7 on: April 09, 2008, 08:08:22 pm »
I just read through http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_Vista, and added a new directory under Toolchain Executables-> Add'l paths, and it works just fine now.  I'm not going to touch it.

Thanks for the help, I'm sure I'll have some more questions at a later date.

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: cannot exec cc1plus???
« Reply #8 on: April 09, 2008, 09:03:46 pm »
Hello.

Quote from: Seronis
Any suggestions?

I've recently bought a laptop with Vista Home Premium 32 bits preinstalled on it, and coinciding with the 8.02 release, I installed there C::B (without MinGW), MinGW, wxMSW 2.8.7, ... and so on.

The versions for MinGW packages that I downloaded were:

binutils-2.17.50-20060824-1.tar.gz (9.320.326 bytes)
gcc-core-3.4.5-20060117-1-vista.tar.gz (3.464.351 bytes)
gcc-g++-3.4.5-20060117-1-vista.tar.gz (4.711.422 bytes)
gdb-6.7.50.20071127-mingw.tar.bz2 (2.077.293 bytes)
mingw32-make-3.81-2.tar.gz (97.305 bytes)
mingw-runtime-3.14.tar.gz (506.843 bytes)
w32api-3.11.tar.gz (1.628.397 bytes)

I've not defined search directories inside C::B (and don't think that they are needed). The only enviroment variable added has been the (obvious) path to the mingw \bin folder. And all is running fine in this Vista system, with all the updates installed (SP1 included). So, if you want to try...

Regards.
« Last Edit: April 09, 2008, 09:08:01 pm by Deschamps »
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: cannot exec cc1plus???
« Reply #9 on: April 11, 2008, 07:11:25 pm »
Using your selection of packages problem is now fixed.  Short on time for now but monday i'll go thru and upgrade a package at a time to what i had before and post which one is the problem.