User forums > Using Code::Blocks
Creating a project file from existing source code and header files?
dominover:
I can't find how to do this anywhere. I have two files test.cpp and test.h that I want to create a new project in code::blocks with. Does anyone know how this is done?
I know how to add files to an existing project and how to add a file to codeblocks but not how to use my files (test.cpp and test.h) to create a new project.
Thanks
oBFusCATed:
Create empty project in this folder and add the files. Then set it up.
dominover:
Thanks, but this is surely not the conventional way of doing it? I do it this way already but unfortunately the project file needs to be amended because the file names have changed and if I change the names of the source code and header files this has implications for the includes.
There must be a conventional way of doing this?
oBFusCATed:
I don't understand what file names have to be changed.
If it is an old project where you have a dsp, vcproj or something else we support you can import your project, otherwise you have to create it from scratch.
ToApolytoXaos:
If I understand it correctly, what you really want to do is what currently a compiler is doing, by placing its header files to a certain location and adds it to PATH.
You could create a directory in a location of your choice, preferably without spaces, and add it to PATH; this way, you could include it to any project of your choice, and change their names accordingly.
Navigation
[0] Message Index
[#] Next page
Go to full version