Page 1 of 1

Finding std libs in a no-std place

Posted: Thu Sep 29, 2011 7:06 pm
by DCKelley
Finding std libs in a no-std place I am new to CodeLite and trying bring in a project that lives in a few different folders. One of these comes from a 3rd party toolkit that tend to mix its "static" source code with that created for each users needs. So I often have lines like:

Code: Select all

#include <asn_internal.h>
#include "Acceleration.h"
Where the first (his static supplied header) is giving me trouble because CodeLite is NOT looking in the same directory as the other headers and source codes, and hence not finding it.

This may be important: This folder and its contents was added to the project using the "add an existing file" to a folder command, so perhaps this enters into this as well. I remain unclear at this point on the proper use of that, but when I change "<>" to be quote ti find that files and goes on to the next so I conclude it is checking the local folder in any event when "" is used.

How can I edit the path it is using for std libs (files delimited with <>), do not seem to find any sort of dialog for this.

Am running release 3.0.5046 on Ubuntu 11.04

Re: Finding std libs in a no-std place

Posted: Thu Sep 29, 2011 9:14 pm
by frank_frl
Hi DCKelley,

you have two choices.
Global:
Settings->Build Settings->Compilers->gnu g++->Advanced->Global Paths

Project level:
Project Settings->Compiler->Include Paths

Regards

Frank

Re: Finding std libs in a no-std place

Posted: Thu Sep 29, 2011 10:16 pm
by DCKelley
Many thanks. The latter seems to be the better choice (as not all things in my world use this 3rd party lib). And this makes sense with my prior experience with other tools. I think the root problem was one of bad paths from a new user (as far as I can determine the tool will use a matching <> file in the users paths).

I have re-added the project several times now a few things trying to get things to work and think I am still confused regarding just what a "virtual directory" is intended to be used for in this tool. At times I am able to add files which then I can not click on to open, this seem to be related to a bad path issue. Is it a correct assumption that any file I put in such a directory (if the path to to it works) is treated as any other file in the project (complied, linked, edited, etc).

So far my best success seem to be import the older MSVS project file and to building up from that (and hand editing these to reflect the current fie systems in use). The simple makefiles I have built and that that work in these directories can build the project but I can seem to get these with CodeLite which states: make[1]: Nothing to be done for `all'. And frankly I lack the script skills to quickly cope (not inviting abuse but the last 20+ years have been with the redmond dark side).

Re: Finding std libs in a no-std place

Posted: Fri Sep 30, 2011 9:58 am
by eranif
DCKelley wrote: I am still confused regarding just what a "virtual directory" is intended to be used for in this tool.
Virtual folder are simply a visual folders which allows the user to organize its sources in the workspace view.
For example, I often create a virtual folders named 'src', 'UI' and 'includes' so I can organize my files. Note that the virtual folders does not really exists on the disk (hence, "Virtual")
DCKelley wrote: Is it a correct assumption that any file I put in such a directory (if the path to to it works) is treated as any other file in the project
You can put files *only* in virtual folders. You can not place your files directly under the project.

Again, the virtual folders are just a display folders, they don't really exists on the disk.

Eran

Re: Finding std libs in a no-std place

Posted: Tue Oct 04, 2011 9:34 pm
by DCKelley
So in CodeLite a work space can have multiple projects and each of these project is composes of a collection of virtual folders with whatever content I place there (and regardless of the actual path in which the target resides). Is this correct?

And as a consequence of this, I can easily have one or more projects (in the same workspace) that reuse the same source file. Each project will in turn show that file in whatever folder organization it was imported into (in the project - not off to the side), a double click allows editing it, and when a change to that file is made suitable rebuild dependencies will occur. Is that all a correct presumption as well?

I realize this is perhaps painfully obvious to those that use it all the time, but as the new guy I am still getting my core concepts down pat.

Re: Finding std libs in a no-std place

Posted: Tue Oct 04, 2011 10:17 pm
by eranif
DCKelley wrote:So in CodeLite a work space can have multiple projects and each of these project is composes of a collection of virtual folders with whatever content I place there (and regardless of the actual path in which the target resides). Is this correct?
Yes. A workspace is just an XML file that keep "pointers" to the project files.
DCKelley wrote:And as a consequence of this, I can easily have one or more projects (in the same workspace) that reuse the same source file. Each project will in turn show that file in whatever folder organization it was imported into (in the project - not off to the side), a double click allows editing it, and when a change to that file is made suitable rebuild dependencies will occur. Is that all a correct presumption as well?
Yes. Note that codelite will not let you add the same file to the same project twice (even when under a different virtual folder), however the same file can exist in the workspace under different projects

Here are some useful links:

http://www.codelite.org/LiteEditor/Work ... ndProjects
http://www.codelite.org/LiteEditor/Documentation
Eran