Author Topic: GNU GCC Compiler not working  (Read 5964 times)

Offline laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
GNU GCC Compiler not working
« on: June 04, 2007, 07:18:54 pm »
i get the error when i use the default compiler(GNU GCC Compiler):
"Chapt3challenge1 - Release" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.

i don't think this is a bug, but just my lack of knowledge of compilers which is why i'm posting it here.

i have the visual studio 2005 compiler but i get so many warnings.

Code: [Select]
#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
    int x;
    int y;
cout << "Hello world!" << endl;
cout << "Please give me a number for x." << endl;
cin >> x;
cout << endl << "Now please givee me a number for y, which will be used to divide into x." << endl;
cin >> y;
if (y <= 0)
{
        cout << " Please enter a number greater than 0." << endl;
        cin >> y;
}
    x = x/y;
    cout << endl << "Thank you, x/y = " << x << "." << endl;

system("pause");
return 0;
}

Offline laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: GNU GCC Compiler not working
« Reply #1 on: June 04, 2007, 07:38:58 pm »
Code: [Select]
[13:14:44.392]: Scanned 0 files for #includes, cache used 0, cache updated 0
[13:14:44.392]: Scanned 0 files for #includes, cache used 0, cache updated 0
[13:14:44.402]: Scanned 0 files for #includes, cache used 0, cache updated 0
[13:14:44.412]: Scanned 0 files for #includes, cache used 0, cache updated 0
[13:14:44.522]: Can't find compiler executable in your search path (GNU GCC Compiler)...
[13:16:47.559]: Can't find compiler executable in your search path (GNU GCC Compiler)...
[13:16:53.638]: WARNING: "Chapt3challenge1 - Release" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
[13:16:53.858]: WARNING: "Chapt3challenge1 - Release" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...

Offline laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: GNU GCC Compiler not working
« Reply #2 on: June 04, 2007, 08:36:34 pm »
oh i dont think i hooked up the path variable

just did it and it still doesnt work. hmmm

am i supposed to be setting the path variable somewhere other than my computer?

ahh i see something in codeblocks

i have no C:/mingw/ folder what do i do?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: GNU GCC Compiler not working
« Reply #3 on: June 04, 2007, 08:46:15 pm »
You are supposed to install gcc (MinGW build on windows). Visit www.mingw.org for more details.
Be a part of the solution, not a part of the problem.

Offline laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: GNU GCC Compiler not working
« Reply #4 on: June 04, 2007, 11:46:34 pm »
i've downloaded the runtime but i dont see any installers in there...

what do i get? there's no specific information about codeblocks that ive found

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: GNU GCC Compiler not working
« Reply #5 on: June 05, 2007, 12:01:18 am »
The "MinGW-5.0.2" download under the "Proposed" heading on the (MinGW) downloads page is an installer that will help you install the necessary packages. For best results, however, I recommend doing it by hand -- download binutils-2.17.50-20060824, mingw-runtime-3.11, w32api-3.7, mingw32-make-3.81-1, and gdb-6.3-2. Extract the contents of all the .tar.gz archives an empty directory (usually "C:\MinGW"), and run gdb-6.3-2.exe and install GDB there as well. Then, open Code::Blocks, open the compiler settings, make sure "GNU GCC Compiler" is selected, go to the "Toolchain executables" tab, and hit Auto-detect if you installed everything in C:\MinGW. If you installed it somewhere else, hit the "..." button and select the directory you used. Remove all the directories in the "Search directories" sub-tabs and restart C::B for good measure, and you're set.
« Last Edit: June 05, 2007, 01:21:04 am by TDragon »
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 oz

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: GNU GCC Compiler not working
« Reply #6 on: June 05, 2007, 06:18:45 am »
i've downloaded the runtime but i dont see any installers in there...

what do i get? there's no specific information about codeblocks that ive found

Download and extract to C:\MinGW, that's all, I just simply packed all necessary together
http://savefile.com/files/753051

Offline laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: GNU GCC Compiler not working
« Reply #7 on: June 05, 2007, 08:38:33 am »
The "MinGW-5.0.2" download under the "Proposed" heading on the (MinGW) downloads page is an installer that will help you install the necessary packages. For best results, however, I recommend doing it by hand -- download binutils-2.17.50-20060824, mingw-runtime-3.11, w32api-3.7, mingw32-make-3.81-1, and gdb-6.3-2. Extract the contents of all the .tar.gz archives an empty directory (usually "C:\MinGW"), and run gdb-6.3-2.exe and install GDB there as well. Then, open Code::Blocks, open the compiler settings, make sure "GNU GCC Compiler" is selected, go to the "Toolchain executables" tab, and hit Auto-detect if you installed everything in C:\MinGW. If you installed it somewhere else, hit the "..." button and select the directory you used. Remove all the directories in the "Search directories" sub-tabs and restart C::B for good measure, and you're set.

hmm
that one didnt work. when i deleted the paths in Search directories' sub tabs and closed codeblocks, they just reappeard. and when i compiled i got the same error. so i cleared them then compiled without closing and it still didnt work.
everything is in C:\MinGW but autodetect didnt detect it. but the same path is entered there so i just left it alone. maybe i should enter it manualy.

ahh there are some files missing in the bin directory:
mingw32-gcc.exe
mingw32-g++.exe
i've downloaded all 5 files you specified. i wonder why it didnt work.

i'll try oz's package.

that did it!!
thanks a lot guys!! you guys you guys know your stuff well!!!


Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: GNU GCC Compiler not working
« Reply #8 on: June 05, 2007, 03:24:40 pm »
:o
I'm embarrassed -- I forgot to include the gcc-core and gcc-g++ packages in the list. So sorry...
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 laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: GNU GCC Compiler not working
« Reply #9 on: June 05, 2007, 05:16:10 pm »
don't be sorry!
i'll look back to this thread if i ever need to create a MinGW directory again!!! you've taken the time to help lots!

thanks again!!

Offline laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: GNU GCC Compiler not working
« Reply #10 on: June 06, 2007, 08:34:10 pm »
thanks but my P4 computer is down. i'll remember that link though :)

Offline laserbeak43

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: GNU GCC Compiler not working
« Reply #11 on: June 07, 2007, 06:43:18 pm »
i see. i'll give it a try sometime then :)