Author Topic: How to open existing projects #2  (Read 11763 times)

Offline mmerlinn

  • Single posting newcomer
  • *
  • Posts: 2
How to open existing projects #2
« on: November 12, 2016, 12:21:59 pm »
I have read http://forums.codeblocks.org/index.php/topic,21399.msg145940.html#msg145940 and I have basically the  same question, however the answers posted at that link do NOT help me.

I have a EXISTING Code Blocks project on my disc that I would like to edit with Code Blocks, but cannot find a method of adding it to Code Blocks projects file.  Like that poster said, I could create a new project then cut and paste the code, but that is an idiotic way of opening an existing project.

One of the answers to that thread suggests to open via Recent Projects.  Well, that does not work because the project I want to open is NOT in Recent Projects.  If it were, I would not be here.

Another answer said to Open the Project File, but I have not found a way to do that.  None of the Open dropdowns will add the existing Code Blocks project file to Code Blocks, and I have tried all of them.

I have searched the Help file, but there is NO information there on how to open an existing project file and no information on how to add an existing project file to Code Blocks, only information on how to create a new project file.

So, is there a way to open an existing Code Blocks project file?  Or do I need to kludge one together by cutting and pasting the existing project into a new project file that I have created in Code Blocks?
« Last Edit: November 12, 2016, 12:23:49 pm by mmerlinn »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to open existing projects #2
« Reply #1 on: November 12, 2016, 01:22:39 pm »
1. File -> Open
2. Change the file type filter to Code::Blocks project/workspaces files
3. Navigate to the project on disk
4. Select it
5. Click open.

If this doesn't work then something is broken.
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5918
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to open existing projects #2
« Reply #2 on: November 12, 2016, 03:08:49 pm »
Quote
I have a EXISTING Code Blocks project on my disc that I would like to edit with Code Blocks, but cannot find a method of adding it to Code Blocks projects file.
What do you want to achieve as described in the above sentence? You want to add a project file to another project file?

As oBFusCATed already gives you the steps to open the project file, so you can simply open the project file. Please note that a project (usually have the file extension .cbp) could manage many source files(such as .cpp and .h files).
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.