Author Topic: First time programming  (Read 4282 times)

away572

  • Guest
First time programming
« on: November 12, 2011, 07:14:06 pm »
Hello all, I have recently set out to learn programming on my own. I am taking online courses through e-learning and am beginning with C...I researched compilers and found Code::Blocks to be one of the best choices. I am having trouble getting started using the program. I downloaded and printed the Code::Blocks manual but I have to admit I still dont know what I am looking at. Does anyone have any advice or know of any tutorials for using Code::Blocks? Thank You

zabzonk

  • Guest
Re: First time programming
« Reply #1 on: November 12, 2011, 07:18:21 pm »
> Hello all, I have recently set out to learn programming on my own

Then C and C++, the two main languages that Code::Blocks supports, may not be the best way to go. Languages like Python are far more suitable as a first language, and sites like http://www.reddit.com/r/learnprogramming are better places to ask questions about learning to program.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: First time programming
« Reply #2 on: November 12, 2011, 07:29:05 pm »
If, however, C/C++ is what you want to learn, realize that Code::Blocks is an IDE, not a compiler, which means it provides an interface to many tools (which may otherwise be quite difficult to use).  Creating a new project describes basic project management with Code::Blocks.

Teltrab

  • Guest
Trouble with "hello world" program
« Reply #3 on: April 05, 2012, 08:17:01 am »
I am starting to work through "Jumping Into C++" by Alex Allain.  The first exercise is a "hello world" program.  I am posting this to help others in my position.  I am running a Windows XP operating system on a 32 bit machine.

Prior to the fix below I kept getting the following message:

"Hello World C++ - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.

**********************************************
This is how to help yourself:

Realize that Code::Blocks is a code generating tool, and not a "compiler".  You will need to download and install a compiler.  One free example is "MinGW" available on the www.mingw.org website.  For the purpose of this discussion, I installed MinGW in C:/Program Files/MinGW. (it lakes a long to time to install and you will see a DOS screen with progress, so just realize that is OK).

Then....
You need to let Code::Blocks know where your compiler is.  Under "Settings" pull down and select "Compiler and Debugger..." and in the window that pops up select the "Toolchain Executables" tab.

For the "Compiler installation directory" I put "C:/Program Files/MinGW" (remember that is where I had put MinGW).

For the specific program files use the "..." button to browse to the "bin" directory (in my case) C:/Program Files/MinGW/bin and select the following files:

C compiler: select > mingw32-gcc.exe
C++ compiler: select > mingw32-c++.exe
Linker for dynamic: select > mingw32-g++.exe
Linker for static: select > ar.exe
Debugger: select > gdb.exe
Resource compiler: select > windress.exe
Make program: select > mingw32-make.exe

I could make this fix work for me when I did it as described, and then I could re-create the error by "messing it up a little."

This post is in compliance with the site rules because it deals with how to set "Code::Blocks".  Also, considering the amount of posts that were asking for this information, may I respectfully request that you consider just leaving this post to help people get past the initial "deer in headlights" phase?

.....We were all green once.  Please be patient with us mortals.


Offline vmars316

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: First time programming
« Reply #4 on: April 07, 2012, 01:24:42 am »
Hello all, I have recently set out to learn programming on my own. locks manual but I have to admit I still dont know what I am looking at. Does anyone have any advice or know of any tutorials for using Code::Blocks? Thank You

Greetings,
(Win7)
I am not sure if you have codeblocks up and running or not.
If not, i just now downloaded: 
 codeblocks-10.05mingw-setup.exe 27 May 2010 74.0 MB Sourceforge.net
from here:
 http://www.codeblocks.org/downloads/binaries
Then I doubleclicked on codeblocks-10.05mingw-setup.exe
and away we go.

I am just learning "C Programming Ansi" from K&R 
Unfortunately, I left the book and my reading glasses in the movie theater.
So I am waiting for my new 'used book (this time)' to come.
In the mean time  I did a whole day of Googling  and came up with:
 http://os.camden.rutgers.edu/c_resources/c_programming/
and
 http://www.tutorialspoint.com/ansi_c/index.htm
and
 C-Programming-AbsoluteBeginner.pdf (from my googling).
Also, lots of stuff on Youtube for C programming.
user 'thenewboston' has lots of "C" stuff
user umicom has c tutorials
http://www.youtube.com/playlist?list=PLA148C5DF0C069CAA&feature=plcp
I just checked youtube for codeblocks. Lots of stuff out there.
 http://www.youtube.com/watch?v=TL5vP45dYps&feature=results_main&playnext=1&list=PL9B5E2939C29B3777

Happy trails!...vmars






Offline Starkgene

  • Single posting newcomer
  • *
  • Posts: 1
Re: First time programming
« Reply #5 on: May 28, 2020, 11:45:45 am »

Hi fellows,
I'm Jeff, computer nerd looking for job options after I graduate by the end of this year. I was about to go with the freeCodeCamp courses (mentioned in practically half of the megathread comments on reddit > r/learnprogramming [MEGATHREAD] Free Courses), but then I came across Code::Blocks and thought I could try to combine both e-learning programs. Or should I just stick to one?