Code::Blocks
November 22, 2014, 06:31:48 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!
 
   Home   Help Search Login Register  :: WebsiteWiki  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: mingw32-gcc.exe: installation problem: cc1plus  (Read 8843 times)
hill0093
Guest
« on: July 16, 2007, 06:06:21 am »

I downloaded codeblocks-1.0rc2_mingw and installed it.
The only non-standard thing I did was not include “Program Files” directory.
I opened a c program in codeblocks v1.0 .
I pressed Build > Compile current file.
It responded with
mingw32-gcc.exe: installation problem, cannot exec `cc1plus': No such file or directory.
C:\CodeBlocks\libexec\gcc\mingw32\3.4.4\cc1plus.exe  exists,
so I added it to Settings > Compiler > Directories with no avail.
I don’t know what to do.
Logged
raph
Almost regular
**
Offline Offline

Posts: 242


« Reply #1 on: July 16, 2007, 07:40:30 am »

RC2 is nearly two years old, please use a current nightly.
Logged
Haf
Advanced newcomer
*
Offline Offline

Posts: 12



WWW
« Reply #2 on: July 16, 2007, 10:13:45 am »

Also, are you using Codeblocks and MingW under Windows Vista? If so, then please do a search in the forum, there are several threads related to the cc1plus issue in Windows Vista.

Short story: It should be sufficient to use the current Codeblocks and current stable MingW, add the directory of the cc1plus.exe to the Windows Path variable, have the compiler in a direct subfolder to the root folder of the hard drive (for instance c:\mingw\) and have the project files on the same hard drive as the compiler.
At least that's how it works for me with Vista.

There should also be a fixed unstable MingW version around that resolves the issues with Vista, but I haven't tried it as of yet.
Logged
TDragon
Lives here!
****
Offline Offline

Posts: 918



WWW
« Reply #3 on: July 16, 2007, 03:34:56 pm »

20-40:
BUT obviously MinGW should be installed into "mingw" directory, in your case C:\Codeblocks\mingw...
How, exactly, do you think this would solve any problems? Keep in mind that, as you mentioned further down in your post, the hardcoded directories are in "/mingw". On Unix systems this is a true absolute path -- or, if you like, relative to the filesystem root; on Windows it's relative to the root of the current drive. Therefore "/mingw" can never be resolved as "/Codeblocks/mingw", but only as "/mingw" (case insensitively, of course).

hill0093:
Windows environment variables are the key. I don't have Vista, but this post contains what I believe is everything one needs for command-line compilations to work. Note that there I am providing instructions for someone using my unofficial newer build of GCC; if you're using strictly packages from MinGW, you'll need to replace each instance of "4.2.0" with "3.4.5" or "3.4.2", depending on which version of the gcc-core and gcc-g++ packages you got. Also note that fewer environment variables are necessary when using MinGW/GCC from within Code::Blocks. As Haf said, searching the forum will turn up some useful information.
Logged

http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 4.8.1 2013-10-06 with 32/64-bit, fixed exceptions/DLLs)
TDragon
Lives here!
****
Offline Offline

Posts: 918



WWW
« Reply #4 on: July 16, 2007, 04:25:00 pm »

I've said it hundredths of times - this "mingw" folder could be in c:\codeblocks or in L:\PrOgRaMs or wherever one needs or wants.
Yes, and this time you said it I responded with a rebuttal. You're wrong. "/mingw" indicates a folder named "mingw" in the root of the drive, not "in c:\codeblocks or in L:\PrOgRaMs or wherever one needs or wants". Putting a folder named "mingw" somewhere other than the root of the drive means that "/mingw" will in no way correlate to it.

As a side note, the gcc.bat correspondence was not a recommendation to roland for an ongoing setup, but a test to help me understand how GCC is working (or not working) on Vista.
Logged

http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 4.8.1 2013-10-06 with 32/64-bit, fixed exceptions/DLLs)
TDragon
Lives here!
****
Offline Offline

Posts: 918



WWW
« Reply #5 on: July 16, 2007, 05:22:52 pm »

If one puts mingw\bin, mingw\include, mingw\lib, mingw\libexec and whole binutils sysdir mingw32 INSIDE any folder whose path doesn't contain whitespaces and add path to bindir to WinSys path variable, problems will vanish for 3.4.5 and c++ headers are problem of 'fours' anyhow... Catching more flies with one stroke, right...
Yes, you keep saying this, but you have yet to explain why it would work. I told you the only way that putting your MinGW installation inside a folder named "mingw" will make things work better is if that folder is in the root of the drive, and explained why. You say that the folder named "mingw" can be elsewhere than the root of the drive, and it will still help. I say you are wrong. Explain why you aren't, please.
« Last Edit: July 16, 2007, 05:31:31 pm by TDragon » Logged

http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 4.8.1 2013-10-06 with 32/64-bit, fixed exceptions/DLLs)
TDragon
Lives here!
****
Offline Offline

Posts: 918



WWW
« Reply #6 on: July 16, 2007, 06:18:02 pm »

I've given you an explanation of why your recommendation is wrong; now I provide an example of it being wrong:
Code:
g++ -v -c test.cpp
Code:
Reading specs from C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw special)
 C:/test/mingw/bin/../libexec/gcc/mingw32/3.4.5/cc1plus.exe -quiet -v -iprefix C:\test\mingw\bin/../lib/gcc/mingw32/3.4.5/ test.cpp -quiet -dumpbase test.cpp -auxbase test -version -o I:\DOCUME~1\John\LOCALS~1\Temp/cckZaaaa.s
ignoring nonexistent directory "C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/include"
ignoring nonexistent directory "/mingw/include/c++/3.4.5"
ignoring nonexistent directory "/mingw/include/c++/3.4.5/mingw32"
ignoring nonexistent directory "/mingw/include/c++/3.4.5/backward"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.5/include"
ignoring nonexistent directory "/mingw/mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5
 C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32
 C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/backward
 C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include
 C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/include
End of search list.
GNU C++ version 3.4.5 (mingw special) (mingw32)
compiled by GNU C version 3.4.5 (mingw special).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 C:/test/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/bin/as.exe -o test.o I:\DOCUME~1\John\LOCALS~1\Temp/cckZaaaa.s

Let me make it as clear as possible:
In the first line, you can see that I have installed MinGW to "C:\test\mingw".
In lines 7 through 14, you can see that all the hardcoded directories beginning with "/mingw" are not found.
Therefore I see no reason to believe that putting your MinGW installation into just a folder named "mingw" not in the root of the drive makes any difference whatsoever.
"C:\mingw"? Yes, because then /mingw is seen to refer to it.
"C:\something\mingw"? No. Obviously not.

I'm not trying to earn your enmity, or tweak your beak just for the fun of it. I'm trying to explain how you made an incorrect statement. I'm also willing to be shown that I made an incorrect statement.
Logged

http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 4.8.1 2013-10-06 with 32/64-bit, fixed exceptions/DLLs)
TDragon
Lives here!
****
Offline Offline

Posts: 918



WWW
« Reply #7 on: July 16, 2007, 07:23:12 pm »

GCC/mingw32 works better when installed in X:\mingw. This we agree on.

I do not agree that GCC/mingw32 works better when installed in X:\somepath\mingw than it does in X:\somepath\anotherpath. You haven't given a satisfactory explanation that it should or shown that it does; I have given an explanation that it shouldn't and shown that it doesn't.

Who is right? Faithful reader, you must decide for yourself. Smiley

-John E. / TDM
Logged

http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 4.8.1 2013-10-06 with 32/64-bit, fixed exceptions/DLLs)
Haf
Advanced newcomer
*
Offline Offline

Posts: 12



WWW
« Reply #8 on: July 18, 2007, 02:48:37 pm »

If one puts mingw\bin, mingw\include, mingw\lib, mingw\libexec and whole binutils sysdir mingw32 INSIDE any folder whose path doesn't contain whitespaces and add path to bindir to WinSys path variable, problems will vanish for 3.4.5 and c++ headers are problem of 'fours' anyhow... Catching more flies with one stroke, right...
Yes, you keep saying this, but you have yet to explain why it would work. I told you the only way that putting your MinGW installation inside a folder named "mingw" will make things work better is if that folder is in the root of the drive, and explained why. You say that the folder named "mingw" can be elsewhere than the root of the drive, and it will still help. I say you are wrong. Explain why you aren't, please.

I agree with TDragon here. As I already stated before I also hold the opinion that the mingw folder should be placed in the root of a filesystem.

The example by 20-40 with the path "/mingw/include" shows this clearly.
If you open the windows command line at for instance "D:\foo\bar" and enter
cd /mingw/include
then it will try to go to the folder "D:\mingw\include"
Note that the path is "/mingw/include" and not "./mingw/include". In the second case, the path would be relative to the current working directory.
Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!