News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

GNU GCC Compiler not working

Started by laserbeak43, June 04, 2007, 07:18:54 PM

Previous topic - Next topic

laserbeak43

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.


#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;
}

laserbeak43

[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...

laserbeak43

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?

Biplab

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.

laserbeak43

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

TDragon

#5
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.
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

oz

Quote from: laserbeak43 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

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

laserbeak43

Quote from: TDragon 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.

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!!!


TDragon

:o
I'm embarrassed -- I forgot to include the gcc-core and gcc-g++ packages in the list. So sorry...
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

laserbeak43

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!!

laserbeak43

thanks but my P4 computer is down. i'll remember that link though :)

laserbeak43

i see. i'll give it a try sometime then :)