Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

Question about How to Build my First C++ Project (My work and my confusion is displayed on two pictures below.) I clicked Build button on the top, then click Build, but at the end of the process, I do not see 0 Errors, 0 warnings. Rather, I see this in 'Build log' "SayHello - Debug" uses an invalid compiler Skipping..." What can I do to fix this problem, specifically which compiler should I use?

OpenStudy (anonymous):

OpenStudy (anonymous):

Do you have the GNU compiler? If you don't then maybe you have to actually get it.

OpenStudy (anonymous):

What other compiler options does it have?

OpenStudy (anonymous):

I'm sure that it comes with a compiler at least.

OpenStudy (anonymous):

I downloaded CodeBlocks. Would this suffice GNU compiler?

OpenStudy (anonymous):

Since this is a Codeblocks issue and not a compiler issue, it is hard to say.

OpenStudy (anonymous):

Would Microsoft Visual C++ 2005/2008 work? That selection is in compiler and debugger setting.

OpenStudy (anonymous):

Yeah. Hope it will work. Me i use Microsoft Visual C++ 2008 and it works perfecly. Try using it.

OpenStudy (anonymous):

If you are on Windows, you're more likely to have Visual C++

OpenStudy (anonymous):

I think that this is CodeBlock issue too. My bro have vaguely read something online and said that to me. May I ask what a compiler is? Maybe, that would help me figure out to find what's wrong with CodeBlocks. The problem that I have is that the book revolves around using CodeBlocks, and my first chapter program would not work. :/ For now, I'll send an email to the authors, asking them directly.

OpenStudy (anonymous):

Do you want my advice? Use a text editor and command line until you get a handle on things.

OpenStudy (anonymous):

May I know how to get text editor? I am very new to computer science subject.

OpenStudy (anonymous):

IDE is good for big projects, not necessarily for learning.

OpenStudy (anonymous):

Are you on windows?

OpenStudy (anonymous):

Yes, I have Window 7.

OpenStudy (anonymous):

You can use Notepad. Or you can use Notepad++ if you want something a bit more advanced.

OpenStudy (anonymous):

Notepad++ is at http://notepad-plus-plus.org/download/v6.5.3.html

OpenStudy (anonymous):

The text editor is just there for editing code. That is all it needs to do. Next you need a compiler. I recommend GCC because there is no license or any other legal nonsense to worry about. If you want GCC to work, you get MinGW at http://sourceforge.net/projects/mingw/files/

OpenStudy (anonymous):

Hmmm. Thank you! ^^ I'll start with learning command lines. Then pursue learning computer language. and thank you for informing me about MinGW as well.

OpenStudy (anonymous):

Once you have MinGW installed, you should have gcc/g++ What you would do is open command prompt (cmd.exe)

OpenStudy (anonymous):

you would run "g++ -o <name-of-program> <file-with-code>"

OpenStudy (anonymous):

For example if you had a file "hello-world.cpp", and you wanted the program to be named "helloworld" you would do `g++ -o helloword hellow-world.cpp`

OpenStudy (anonymous):

ah! (nodding now in understanding) o,o

OpenStudy (anonymous):

For now try to install MinGW

OpenStudy (anonymous):

will get right to it. ^^

OpenStudy (anonymous):

S. Korea has fast internet, right?

OpenStudy (anonymous):

네 ㅎㅎㅎ. ^^ Yes, hahaha.

OpenStudy (anonymous):

Did you install MinGW?

OpenStudy (anonymous):

Yes. In the case for a Notepad plus plus, does the file name end with .txt? If so, would I write g++ -o wio is an awesome progammer.txt in command prompt?

OpenStudy (anonymous):

first go to command prompt then type in `g++ test.cpp` Tell me what it says

OpenStudy (anonymous):

After the command, it says 'g++' is not recognized as an internal or external command, operable program or batch file.

OpenStudy (anonymous):

okay, do you know where you install MinGW?

OpenStudy (anonymous):

Was it C:\MinGW ?

OpenStudy (anonymous):

I think I have downloaded MinGW. :/ That file exists in my C drive.

OpenStudy (anonymous):

Okay can open command line? Then type `cd C:\`

OpenStudy (anonymous):

Or actually, can you just use explorer and go to your C drive? Then go into the MinGW folder, tell me what is in that folder.

OpenStudy (anonymous):

just typed cd C:\ in command prompt.

OpenStudy (anonymous):

I just want to know the directory layout of your MinGW. There should be a bin folder and in it should be gcc and g++ I want to confirm these files are there.

OpenStudy (anonymous):

Yes, there is a bin folder there. In the bin folder, there is a folder called mingw-get.

OpenStudy (anonymous):

This is the folder in bin.

OpenStudy (anonymous):

Hmm, what is in libexec?

OpenStudy (anonymous):

Inside libexec, there is a folder called mingw-get, and in that, this is the list.

OpenStudy (anonymous):

Things have changed a bit since I used it.... Hmmm I guess I'll try installing it myself first and then explain what I did.

OpenStudy (anonymous):

Thank you. ^^

OpenStudy (anonymous):

Hmmm, let's see first of all on the installer, you want to select Basic Setup

OpenStudy (anonymous):

What should I click after?

OpenStudy (anonymous):

Okay so what we downloaded wasn't all of MinGW, but an installer for MinGW stuff

OpenStudy (anonymous):

ah, so should I check everything within basic setup?

OpenStudy (anonymous):

Nope, you wouldn't need that. Only gcc-g++ stuff

OpenStudy (anonymous):

Click it, mark for install. Then go to apply changes under Installation

OpenStudy (anonymous):

Downloading is in process.

OpenStudy (anonymous):

You are quite a genius. o,o

OpenStudy (anonymous):

go to MinGW\bin and tell me if you see g++.exe

OpenStudy (anonymous):

The package is still downloading. I will check as soon as it is completed.

OpenStudy (anonymous):

This is what is in the file, bin, after the installation.

OpenStudy (anonymous):

can you run g++ and tell me what happens?

OpenStudy (anonymous):

g++ test.cpp in command prompt, correct?

OpenStudy (anonymous):

sure you can try that

OpenStudy (anonymous):

you need command prompt to be navigated to that bin folder

OpenStudy (anonymous):

The result is still the same.

OpenStudy (anonymous):

okay, first type `cd C:\MinGW\bin`

OpenStudy (anonymous):

then just type `g++`

OpenStudy (anonymous):

tell me what happens.

OpenStudy (anonymous):

This popup comes out. G++.exe - No Disk

OpenStudy (anonymous):

Yeah, that happened to me and I was hoping it wouldn't happen to you. This is absolutely ridiculous. Let me think

OpenStudy (anonymous):

No problem. ^^

OpenStudy (anonymous):

May we continue our discussion tomorrow? I have to sleep now to wake up in time for school tomorrow. :/ Thank you for the your continuous help. Thank you again, wio. ^^

OpenStudy (anonymous):

Sure. Good luck.

OpenStudy (anonymous):

Later~

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!