Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: SupportGame on October 14, 2011, 04:47:49 am

Title: About Empty file[help]
Post by: SupportGame on October 14, 2011, 04:47:49 am
Hi everybody.
My name is Daniel, I'm a new user in this forum, and i need help about one doubt.

If i want to create a little problem, like pow.
Do I need to create a project?...
what about an empty file?
what is the difference between them?

i tried to make my code in an empty project, but codeblocks can't compile neither run.
please help.


thanks!





Title: Re: About Empty file[help]
Post by: ollydbg on October 14, 2011, 05:28:16 am
As a beginner, you should firstly read some manual/wiki. Like: Creating a new project - CodeBlocks (http://wiki.codeblocks.org/index.php?title=Creating_a_new_project)
Title: Re: About Empty file[help]
Post by: Alpha on October 14, 2011, 11:18:38 pm
If you continue to have problems after reading the page (http://wiki.codeblocks.org/index.php?title=Creating_a_new_project) ollydbg mentioned, it is possible you missed setting up a compiler (http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler).
Title: Re: About Empty file[help]
Post by: Radek on October 15, 2011, 01:43:57 pm
You must create a project, like in any IDE. This way, you will create a control file which will maintain your project files and which will compile, link, run and debug them. Select a project according to what you are about to write (wxWidgets, QT4, console app, GTK app and so on). You can also select an Empty project but then you get (almost) no additional support from the IDE - the IDE will only compile and link.

Note that CodeBlock is a "multi purpose" IDE, not (as it is usual) a "single purpose" IDE for a particular compiler and a particular development environment. Such "single purpose" IDEs are usually parts of compiler installation and they are already pre-configured for their particular usage. You can start them and start writing your apps in them outright. In CodeBlocks, you need to install your compiler and development environment (like QT4) first and then tell CodeBlocks, which compiler you are using. That's why you can find so many different "projects" on the list and that's why many of them will not work for you :)  You haven't installed the needed tools.

Okay, we have everything ready and we have selected our project. Go through the wizard, select the project directory, do not uncheck the debug build. At the end of the wizard, you can select an empty project, thet means, a project with no pre-added files to your project, no predefined "prototypes", no automatic-written comments, licence agreements and so on. If I understand well, that's exactly what you want to achieve. You will start with adding a new (empty) file to your project.

But before you start writing, configure your editor. It is well configurable and you will able to achieve most of your wishes. Also, configure keyboard shortcuts (again, a wide offer of configurable shortcuts). I don't think you will be disappointed with CodeBlocks :) IMO, it's the best open source IDE :)
Title: Re: About Empty file[help]
Post by: SupportGame on October 16, 2011, 10:50:33 pm
Thanls all for the help. I read all, including the links and now i'm well-informed about projects and files.
"I've clarified my doubts"