Page 1 of 1

Making a new file your active one

Posted: Thu Mar 15, 2012 3:37 am
by bob_sanchez
I am using Codelite version 3.5.5377 on Windows 7.

I am just getting familiar with Codelite and I am having trouble switching active files. How do I do this? Whenever I write, compile, and run a new file Codelite runs the first one I did. I know that Codelite thinks I still want it to run the original and am trying to figure out how to tell it to run new ones.


Sorry if this is a really basic question, I am very new to both C++ and Codelite. Any help is incredibly appreciated.

Re: Making a new file your active one

Posted: Thu Mar 15, 2012 3:08 pm
by DavidGH
Hi,

If by 'file' you mean 'project', you need to switch between projects first. You can do so from the Workspace View, either by using the 'Select Active Project' tool on its toolbar, or by right-clicking on the project's name and selecting 'Set as Active'.

Regards,

David

Re: Making a new file your active one

Posted: Thu Mar 15, 2012 11:46 pm
by bob_sanchez
DavidGH wrote:Hi,

If by 'file' you mean 'project', you need to switch between projects first. You can do so from the Workspace View, either by using the 'Select Active Project' tool on its toolbar, or by right-clicking on the project's name and selecting 'Set as Active'.

Regards,

David
Ah, there we go. I thought that it was handled on a file-by-file basis as opposed to on the project level. That's probably the issue.

Thanks for the help!

Re: Making a new file your active one

Posted: Fri Mar 16, 2012 12:15 pm
by bob_sanchez
Never mind, still struggling with this. Despite changing active status at the project level, it still runs certain files regardless of what I compile and attempt to instruct it to run. I am completely vexed.

To elaborate: whenever I start a new project and file, the file never responds. The "hello world" program under main.cpp is the only thing that will run, and it is under all new workspaces and projects, I can't get rid of it. I don't understand why this is happening.

Re: Making a new file your active one

Posted: Fri Mar 16, 2012 1:33 pm
by eranif
bob_sanchez wrote: it still runs certain files regardless of what I compile and attempt to instruct it to run
I am not sure what does "run files" means, but executable can be run

codelite will execute whatever it is instructed in the project settings (right click on the project -> settings -> general -> "Program to Run / Debug")
so it does not matter which file is opened in the editor, it will always run the same file it is instructed.

Each project is capable of handling one target (executable, dll, shared-library, archive etc) - if you want to create multiple executables, each executable should have its own project

Eran