News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Add headers to project

Started by Manu12x, October 07, 2016, 09:30:09 PM

Previous topic - Next topic

Manu12x

Ok.. i am new to codeblocks, i was using lazarus.
I created a new project file .cbp with a cpp file inside it.
How can i add headers (created by me) into the project? If i do Open "example.h" i can edit it but it tells error while saving.
How can i add the headers to the projects and automatically be opened if i open the project?

oBFusCATed

Have you tried using Project -> Add files?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Manu12x

Quote from: oBFusCATed on October 08, 2016, 12:23:41 AM
Have you tried using Project -> Add files?
Yes i tried, i selected the file to open in the "openDialog" and it doesn't show anything.

oBFusCATed

This command won't open the file. It will just add it to the project tree in Management -> Projects.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Manu12x

Quote from: oBFusCATed on October 08, 2016, 04:11:42 PM
This command won't open the file. It will just add it to the project tree in Management -> Projects.
Ok but next time i open the project it only opens the main.cpp.. and so i should open the headers file again..

oBFusCATed

Codeblocks remembers all opened files on project close and next time it reopens them.
This works fine for me and there is an option which controls this, but I guess it is enabled for you.
So please post the exact steps to reproduce the problem.
And the version you're using.

p.s. you can use alt-o to open files that are part of the project.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Manu12x

Quote from: oBFusCATed on October 09, 2016, 12:01:34 AM
Codeblocks remembers all opened files on project close and next time it reopens them.
This works fine for me and there is an option which controls this, but I guess it is enabled for you.
So please post the exact steps to reproduce the problem.
And the version you're using.

p.s. you can use alt-o to open files that are part of the project.
Ok got it!
I am totally new to Code::blocks with a bit knowledge of C++.
Before code::blocks i was using Lazarus IDE with Free Pascal compiler, pascal language is the best language i know good, but i'd like to learn c++, adding a challenge to my programming way! I'm starting using SDL2 lib.. that's funny