Hi
I have started learning C and I am enjoying CB quite a bit.
I am wondering that if it it possible to run compile and run .c files without creating a project?
thanks
Quote from: kartal on June 06, 2009, 07:07:32 AM
I am wondering that if it it possible to run compile and run .c files without creating a project?
Yes, but with limitations. Just try!
MortenMacFly, how do I do it? It seems like I need a project to be able to open and compile a file?
1. Open C::B
2. File->New->File
3. Select C/C++ File and do what the wizard asks you
4. Write this program:
#include<stdio.h>
int main()
{
printf("Dr.Optix :D");
return 0;
}
5. Press F9 and all should work without problems :)
Dr.Optix ,
For some reason, I cannot get it to work. It(F9) is just running previously compiled project. I have tried clean, clean workspace etc. I cannot get it to compile the currently open file that is not part of any project. Bear in mind though I do not want to delete or get rid of my open projects. I just want to be able to compile a file that is not part of any projetc, just for convenience.
Tryed with multiple instance of C::B like
One where your project is open and one where you edit/compile your "lone wolf" file
EDIT:
Also you can use Ctrl+Shift+F9 to compile current file, but it just compile it, it don't run it.
Quote from: kartal on June 06, 2009, 06:23:16 PM
Dr.Optix ,
For some reason, I cannot get it to work. It(F9) is just running previously compiled project. I have tried clean, clean workspace etc. I cannot get it to compile the currently open file that is not part of any project. Bear in mind though I do not want to delete or get rid of my open projects. I just want to be able to compile a file that is not part of any projetc, just for convenience.
The default shortcut for compile current file is "Strg+Shift+F9" (easy to see if you open the "Build" menu).
I am really not sure what I am doing wrong here. The only things I can think of are, 1-user error, 2-I am using nightly.
I can compile the current file but when I click on "Run" it runs the project or tries to built the active project.
Close all your projects first (empty workspace), then try again.