Codelite Project Settings

Source: Internet
Author: User
Tags codelite

From: http://codelite.org/LiteEditor/ProjectSettings

Project Settings

You 've decided to build a betterHello WorldProgram, so you 'vecreated a new workspace and added a project to it. Now you want to alter how codelite builds
And runs that project...

Either click the appropriate button in the workspace view toolbar, or right-click over the project's name in the workspace view and, from the context menu, selectSettings.... The 'Project settings' dialog will appear, open at
'General 'tab.

At the top of the dialog You'll seeConfiguration typeComboBox, which will normally containDebugOr
Release. To the right of that is a button that takes you to theconfiguration manager, where you can edit these choices and add others.

The 'General 'tab lets you set varous things, mostly to do with building the project. You can chooseProject Type:
Executable, OrStaticOrDynamic library. You can select whichCompilerWill be used:
G ++,Gcc(For 'C only' projects) andVC ++; And
Debugger: Currently the only choice is
GDB.

Skipping a field for a moment,Intermediate directory, Which will probably be set either./DebugOr
./Release, Lets you configure where output files are put. if you don't like the default, there's a button to call a directory-select dialog, Or you can write in an alternative. if you don't want to use an intermediate directory, enter '. '.
Now backOutput fileWhich, as it says, is the filepath that will be used for the file that you're building. By default this will be$ (Intermediatedirectory)/<projectname>But you can change
Both the path and the name.

Next isCommand, Which is the filepath that codelite uses both to run and to debug the program. This will normally be./<Projectname>. In the field below you can add any
Command argumentsTo pass to the program as it's run e.g.-- HelpWill result in
./<Projectname> -- Help. Finally, before running, the working directory will be changed to the contents ofWorking directoryField.

When executing your program inside codelite, it actually runs in a terminal. the checkboxPause when execution ends, Which is ticked by default, means that the terminal stays open after closing
The program; so any error messages or program output remains visible. If you don't need this, you can untick the box.

The 'compiler' tab has three fields, each with a button for easier editing.Compiler OptionsLets you alter how WX-config is invoked. For example, if you want your project to build using a different
WxWidgets version, you can change$ (Shell WX-config...To
$ (Shell/path/to/desired/wx-config...

InAdditional search pathYou tell the compiler to look for include files, shocould your project store them in unusual locations.PreprocessorLets
You pass other macros (separated by semicolons) to the Preprocessor; for example, you might have a logging macro to use in debug builds.

If you don't want to use the compiler for this project, for instance because it's written in PHP, tickCompiler is not required for this projectCheckbox.

The 'linker 'tab is similar to the 'compiler' tab. In
OptionsYou can alter the WX-config path, or set a different optimisation level.LIBRARY PATHLets you add search paths, andLibrariesLibraries.
(N. B. codelite will remove any 'lib' prefix from the library name and also any extension, so for G ++Libmylibrary.1.aWill become
-Lmylibrary.)

Make sure that you use the same WX-config path (and debug, Unicode settings) as you did in the 'compiler' tab.

The first field in the 'destoger' tab lets you set a path to a particle debugger, in case you have several available. There is a checkbox and fields to allow debugging a remote target.

Lastly there is a field where you can enter commands to pass to the debugger on startup. for example, if there are several different versions of your source-code (perhaps for different wx builds, or different platforms) GDB may pick the wrong
Set of symbols to use. You can point it to the correct ones by entering the 'dir' command:DIR/path/to/use/

If your platform doesn't need resources compiled e.g. Linux, tick the 'not needed' checkbox.

There are two fields, where you can alter
Compiler OptionsOr add anyAdditional search pathsTo be passed to the resource compiler during a build.

The 'prebuilt' and 'postbuild' tabs are identical (optional t s/pre/post ). both allow you to define a collection of shell commands to be executed before (after) compilation. for example, you cocould add

 wxrc /c /v /o resources.cpp resources.xrc

And it wocould be run before the actual build process starts.

Or on the postbuild page you cocould Add:

 cp *.a  ../../lib/ cp *.h  ../../include/

The next tab, 'custom', is described
Here. It lets you use a pre-existing makefile instead of having codelite create a new one.

The last tab, 'custommakefile Steps', also allows you to specify makefile rules to be executed during the pre-Build stage. It's discussed in detailhere.

Finally, at the bottom of the dialog is a 'help' button. instead of orthodox help, this lists available macros e.g. $ (date), $ (workspacepath), which can be used in appropriate places inside the dialog.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.