Hi i've got a problem with multiple binaries within a project, how can i address them, when i press F7, then it does nothing:
https://s28.postimg.org/9hmf8lpbh/auto.png
Where do i specifiy which file should be build? e.g. host_vect.c or host_vect.cpp both produce fine binaries when i compile them manually in console but i want to be able to build them within a codelite project and execute either of them in debug mode by some easy selection.
This is when i manually click on one file to compile then its only .o not linking to a binary, how can i tell it to not only compile but also to link to a binary?:
https://s14.postimg.org/kbr70jpm9/manu.png
Thanks.
handling multiple binaries within a project
-
- CodeLite Curious
- Posts: 5
- Joined: Fri May 05, 2017 6:24 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
-
- CodeLite Curious
- Posts: 5
- Joined: Fri May 05, 2017 6:24 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: handling multiple binaries within a project
Ok i got it to try linking now when setting an output file, weird would be more logical to specify the main input file.
Also depending on that selection is only indirectly available by disabling all other main files, would be more logical to specify which main file to build as target. Or even have a manual build option instead of just manual compile which doesnt make sense anyway if it builds not executeable. So can i somehow easily change what target source to build within a project?
Also depending on that selection is only indirectly available by disabling all other main files, would be more logical to specify which main file to build as target. Or even have a manual build option instead of just manual compile which doesnt make sense anyway if it builds not executeable. So can i somehow easily change what target source to build within a project?
-
- CodeLite Curious
- Posts: 5
- Joined: Fri May 05, 2017 6:24 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: handling multiple binaries within a project
btw if i'd split up the project into multiple projects is there a way to share common files between different projects, so these files don't have to be included in every project?
The main problem probably also is i use a git, so i'd like all files from git included into a project and then select what binary to build, that would be a pretty simple straight forward approach? Is that possible or how could i otherwise work on all files of the git efficiently?
The main problem probably also is i use a git, so i'd like all files from git included into a project and then select what binary to build, that would be a pretty simple straight forward approach? Is that possible or how could i otherwise work on all files of the git efficiently?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: handling multiple binaries within a project
The standard project produces a single binary. If you want multiple binaries from a single project, then you need to write your own makefile and define the project as "custom" from:
Project settings->customize->custom build->enable custom build
Once enabled, you can set the "build" (which will be executed when you hit F7) "clean" and other commands for this project.
OR, you can create multiple projects, each for binary
Project settings->customize->custom build->enable custom build
Once enabled, you can set the "build" (which will be executed when you hit F7) "clean" and other commands for this project.
OR, you can create multiple projects, each for binary
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 5
- Joined: Fri May 05, 2017 6:24 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: handling multiple binaries within a project
Ah ok yes i tried that, but then there was the problem that these makefiles are not compatible when changing platform, like switching between windows and linux, when putting the makefile in the git project dir that will be a problem. Also i couldn't find how to execute and debug the resulting binaries.eranif wrote:If you want multiple binaries from a single project, then you need to write your own makefile and define the project as "custom" from:
Project settings->customize->custom build->enable custom build
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: handling multiple binaries within a project
Here is a link that explains how to work with CMake and CodeLite using an external makefile http://codelite.org/LiteEditor/CustomMakefiles
Also, to debug such binaries, all you need to do is point CodeLite to the binary you want to debug in project settings->general->executable to debug/run
Eran
Also, to debug such binaries, all you need to do is point CodeLite to the binary you want to debug in project settings->general->executable to debug/run
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 5
- Joined: Fri May 05, 2017 6:24 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: handling multiple binaries within a project
Ahh didn't know the custom makefiles also work with cmake, looks like that could really work, i can put a cmake into every binary folder then, and specify in the targets to cd there before executing cmake.
Just switching executables in the settings everytime seems a bit complicated then or can i also define run and debug targets that run or debug a specific code within CL? Then i would make a Compile, Clean, Run and Debug target for every binary in the project.. ^^
Just switching executables in the settings everytime seems a bit complicated then or can i also define run and debug targets that run or debug a specific code within CL? Then i would make a Compile, Clean, Run and Debug target for every binary in the project.. ^^