Author Topic: Add headers to project  (Read 4825 times)

Offline Manu12x

  • Single posting newcomer
  • *
  • Posts: 4
Add headers to project
« on: October 07, 2016, 09:30:09 pm »
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?
« Last Edit: October 07, 2016, 09:50:44 pm by Manu12x »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Add headers to project
« Reply #1 on: October 08, 2016, 12:23:41 am »
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!]

Offline Manu12x

  • Single posting newcomer
  • *
  • Posts: 4
Re: Add headers to project
« Reply #2 on: October 08, 2016, 02:29:07 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Add headers to project
« Reply #3 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.
(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!]

Offline Manu12x

  • Single posting newcomer
  • *
  • Posts: 4
Re: Add headers to project
« Reply #4 on: October 08, 2016, 10:45:39 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..

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Add headers to project
« Reply #5 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.
(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!]

Offline Manu12x

  • Single posting newcomer
  • *
  • Posts: 4
Re: Add headers to project
« Reply #6 on: October 09, 2016, 11:52:54 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