Code::Blocks Forums

User forums => Help => Topic started by: Jeeproxx on April 22, 2008, 03:07:26 am

Title: My apologies if this is a silly question....
Post by: Jeeproxx on April 22, 2008, 03:07:26 am
I am teaching myself C++ and have installed Codeblocks on my XO laptop (which is essentially running Fedora Core 7). I've read the Codeblocks manual and searched around the forum a bit looking for the answer to my question but to no avail.

My question is this... whenever I start a new project, my "main.cpp" file contains a "Hello World" script in it. Thinking I might have accidentally caused this myself by somehow saving over top of a "main.cpp" template or something, I removed it (via yum), did a "clean all" (via yum), rebooted, reinstalled, and seem to be getting the exact same issue. Is this a default "main.cpp" that will be created for every "console project" i build, which i can just go ahead and change, or have i done something wrong? Where else can I find a little more documentation regarding Codeblocks which is a little more in depth the the basic manual?

Thanks in advance
Title: Re: My apologies if this is a silly question....
Post by: JGM on April 22, 2008, 04:04:32 am
Yes
Title: Re: My apologies if this is a silly question....
Post by: Jeeproxx on April 22, 2008, 04:18:55 am
Yes?

Yes I am doin' something wrong? Yes it is a default template? Yes there is a location to find more documentation so I don't have to ask silly questions?

I always love helpful people.

Soo typical.

Thanks for nuthin' there fella. I just need a little point in the right direction,  a url would be just great.
Title: Re: My apologies if this is a silly question....
Post by: ouch on April 22, 2008, 06:06:20 am
yes, anytime codeblocks starts a new project of anykind a wizard and/or a basic sample template is loaded up with it.

you can delete it or modify it, it's your choice.
Title: Re: My apologies if this is a silly question....
Post by: Jeeproxx on April 22, 2008, 06:14:09 am
Thank you for that clarification. I do appreciate it. As i said before, I have read through the manual and understand that documentation is still a work in progress. I suppose the current user manual and the forums is the only sources of info at this point?

Anyways, thanks for the help.
Title: Re: My apologies if this is a silly question....
Post by: Deschamps on April 22, 2008, 12:32:16 pm
You could also begin an empty project (or add an empty file to your current project), if you wish. Or edit the file and project properties generated by the C::B wizard and save it as an "user template", so you could begin your default console projects using your own preferences and contents.

As a suggestion: wizards are only like a 'shortcut' for using default files and projects without creating them from scratch each time, and so don't waste time in those "basic" routines. But creating empty projects and files from scratch, and specifying the project' properties and build targets by hand, is a better way to learn programming using C::B, I think.

Regards.
Title: Re: My apologies if this is a silly question....
Post by: JGM on April 22, 2008, 06:17:43 pm
Thanks for nuthin' there fella. I just need a little point in the right direction,  a url would be just great.

 :lol: hahaha sorry for such simple answer  :wink:

yes, anytime codeblocks starts a new project of anykind a wizard and/or a basic sample template is loaded up with it.

That was my yes   :lol:
Title: Re: My apologies if this is a silly question....
Post by: thomas on April 22, 2008, 07:11:52 pm
Luckily, the wizards will no longer overwrite an already existing main.cpp (thanks to Martin).
That was one thing that got me many times in the past.

Tip: You can simply delete the file from the c or cpp subdirectory (whichever you use) inside your templates/wizards folder, and it will not be "generated" for every new project (actually, it's copied).
Even better, though: you customise this for any number of files with whatever names you want. For example, if you want each of your programs to have the files "app.cpp", "app.h", and "resources.xml", you can just drop these into the folder, and the wizard will copy the files to every newly created project and will add them to the project, too.

Quote
installed Codeblocks on my XO laptop
Wow, seriously? It runs on that?
Title: Re: My apologies if this is a silly question....
Post by: Jeeproxx on April 22, 2008, 07:56:55 pm
Ya Man!!

It runs like a champ on the XO! I had Eclipse installed but MAN... WAAAAy to heavy. I even stripped it down to a vanilla install and just no good.

C::B runs AWESOME on the XO!! I've been hackin on it pretty hard and really have it tuned out now. I haven't tried to "Sugarize" C::B and probably won't (Sugar is the desktop env.). I using xfce and honestly it runs better, more efficiently,
and offers more functionality then Sugar.

Anyways, thanks so much for the help. Sorry for being snippy. You know how some open source forums can get kinda....
hhhmmm.... less then courteous? I'm sure you know what i mean! lol