Jump to ID:
IDE

Project Home

Tracker

Documents

Discussions

Wiki

Project Info
Forum Topic - Confirm bugs in 4.7.0?: (10 Items)
   
 
 
Confirm bugs in 4.7.0?  
Can someone confirm if the following are known bugs in the IDE?

 I have include files that are stored in subdirectories under the workspace directory but not in a project.  The path to
 them is absolute.  The compiler finds the files when building.

The editor can't find include files in the "extra include paths".

When I edit one of these files and then build the project, the file is automatically saved but make does not detect the 
change.  I have to force a rebuild of the whole project to incorporate the changes.

I have all these external source and include files in one directory and have to add both an extra include and extra 
source path to the project to get the editor and compiler to recognize them.  This causes double references in the 
project for each file and confusion as to which one should be opened for editing.  I would like to be able to separate 
the source and include files into separate directories.  And since they are stored under the workspace, I would like to 
be able to reference them relative to the workspace instead of using absolute paths.
Re: Confirm bugs in 4.7.0?  
IDE would see files only if they are in one of the IDE's projects. Putting them in workspace is not enough.
If you want to have headers separately just create a project and specify as location of your project where the headers 
are. You can create it as "makefile" project with dummy make.
You can refer to them using project variables instead of absolute path in this case.

On 24/11/10 09:56 AM, Robert Murrell wrote:
> Can someone confirm if the following are known bugs in the IDE?
> 
>  I have include files that are stored in subdirectories under the workspace directory but not in a project.  The path 
to them is absolute.  The compiler finds the files when building.
> 
> The editor can't find include files in the "extra include paths".
> 
> When I edit one of these files and then build the project, the file is automatically saved but make does not detect 
the change.  I have to force a rebuild of the whole project to incorporate the changes.
> 
> I have all these external source and include files in one directory and have to add both an extra include and extra 
source path to the project to get the editor and compiler to recognize them.  This causes double references in the 
project for each file and confusion as to which one should be opened for editing.  I would like to be able to separate 
the source and include files into separate directories.  And since they are stored under the workspace, I would like to 
be able to reference them relative to the workspace instead of using absolute paths.
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post75788
> 
Re: Confirm bugs in 4.7.0?  
> IDE would see files only if they are in one of the IDE's projects. Putting 
> them in workspace is not enough.
> If you want to have headers separately just create a project and specify as 
> location of your project where the headers are. You can create it as "makefile
> " project with dummy make.
> You can refer to them using project variables instead of absolute path in this
>  case.

I tried the dummy project.  But when I would edit one of these include files, they would not get automatically saved 
when the project was built.
Re: Confirm bugs in 4.7.0?  
It may be that its the source files referenced in the extra source path that is not being saved.  Its been a while since
 I tried this.
Re: Confirm bugs in 4.7.0?  
Hi, Robert,

See some replies ([cwd]) in-line, below.

HTH,

Christian


On 10-11-24 9:56 AM, "Robert Murrell" <community-noreply@qnx.com> wrote:

> Can someone confirm if the following are known bugs in the IDE?
> 
>  I have include files that are stored in subdirectories under the workspace
> directory but not in a project.  The path to them is absolute.  The compiler
> finds the files when building.
> 
> The editor can't find include files in the "extra include paths".
> 
> [cwd] Is this a "QNX C Project"?  If so, then the C/C++ index should have
> these include paths injected into it.  If not, it may be a bug.  If your
> project is a regular makefile project, then you will have to tell the indexer
> about the include paths yourself, in the "C/C++ General -> Paths and Symbols"
> page in the project settings.
> 
> 
> When I edit one of these files and then build the project, the file is
> automatically saved but make does not detect the change.  I have to force a
> rebuild of the whole project to incorporate the changes.
> 
> [cwd] This is normal when not using gcc's dependency-checking features.  Try
> enabling the "User Headers" option in the "Dependency Checking" sub-menu of
> the context menu on your project.
> 
> 
> I have all these external source and include files in one directory and have
> to add both an extra include and extra source path to the project to get the
> editor and compiler to recognize them.  This causes double references in the
> project for each file and confusion as to which one should be opened for
> editing.  I would like to be able to separate the source and include files
> into separate directories.  And since they are stored under the workspace, I
> would like to be able to reference them relative to the workspace instead of
> using absolute paths.
> 
> [cwd] Does referencing them relative to $(WORKSPACE_ROOT) in your makefile not
> work (if QNX C Project).  Otherwise, relative paths should work, too.  You
> should be able to separate the headers from the source files.  Is there a
> reason why you don't?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post75788
> 
> 

Re: Confirm bugs in 4.7.0?  
> > [cwd] Does referencing them relative to $(WORKSPACE_ROOT) in your makefile 
> not
> > work (if QNX C Project).  Otherwise, relative paths should work, too.  You
> > should be able to separate the headers from the source files.  Is there a
> > reason why you don't?

I manually ran make against the project with the '-p' switch.  A search of the output does not have "WORKSPACE_ROOT" 
being defined.  I'll try it to see if it works.  Relative paths are difficult in that I'm not sure of the current 
directory when a file is compiled.

If I split out the header files and only reference them from a extra include, the editor can't find them (it underlines 
them with a squiggly yellow line).  I can't auto-open them from the editor and have to open them from the project 
explorer.
Re: Confirm bugs in 4.7.0?  
Hi, Robert,

WORKSPACE_ROOT would only be provided by a QNX Project when it performs the
build.  If you need to build on the command-line, that doesn't help.

What kind of project are you dealing with?  If it's a Makefile project using
the QNX Recursive Makefiles, then paths relative to PROJECT_ROOT should
work.  e.g., $(PROJECT_ROOT)/../extra_inc/whatever

The squiggly yellows would be addressed by adding the include paths to the
"Paths and Symbols" page of the project properties.

It all really depends on what kind of project you're using (managed make,
makefile, or QNX).

cW


On 10-11-24 11:20 AM, "Robert Murrell" <community-noreply@qnx.com> wrote:

>>> > > [cwd] Does referencing them relative to $(WORKSPACE_ROOT) in your
>>> makefile
>> > not
>>> > > work (if QNX C Project).  Otherwise, relative paths should work, too.
You
>>> > > should be able to separate the headers from the source files.  Is there
a
>>> > > reason why you don't?
> 
> I manually ran make against the project with the '-p' switch.  A search of the
> output does not have "WORKSPACE_ROOT" being defined.  I'll try it to see if it
> works.  Relative paths are difficult in that I'm not sure of the current
> directory when a file is compiled.
> 
> If I split out the header files and only reference them from a extra include,
> the editor can't find them (it underlines them with a squiggly yellow line).
> I can't auto-open them from the editor and have to open them from the project
> explorer.
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post75816

Re: Confirm bugs in 4.7.0?  
> Hi, Robert,
> 
> WORKSPACE_ROOT would only be provided by a QNX Project when it performs the
> build.  If you need to build on the command-line, that doesn't help.
> 
> What kind of project are you dealing with?  If it's a Makefile project using
> the QNX Recursive Makefiles, then paths relative to PROJECT_ROOT should
> work.  e.g., $(PROJECT_ROOT)/../extra_inc/whatever
> 
> The squiggly yellows would be addressed by adding the include paths to the
> "Paths and Symbols" page of the project properties.
> 
> It all really depends on what kind of project you're using (managed make,
> makefile, or QNX).
> 
> cW

The project is a QNX C++ project.  I do see PROJECT_ROOT in the output listing and that will work if WORKSPACE_ROOT 
doesn't.  There isn't a "Paths and Symbols" page in the project settings that I can see.
Re: Confirm bugs in 4.7.0?  
Ah, OK.  If it's a QNX Project, then you will see very different settings
than a Makefile project.  In particular, there is no "Paths and Symbols."
But, then, the QNX Project should automatically add the EXTRA_INCVPATH and
EXTRA_SRCVPATH directories to the appropriate slots in the indexer.  If not,
then it looks like a bug.  Can you share details of your common.mk file, the
macros that are set in there?

Paths relative to $(PROJECT_ROOT) should work in this case.  You can also
use, for example, $(PROJECT_ROOT_xyz) to reference a project xyz but that
wouldn't work on the command-line (the QNX Project injects such variables
only when building in the IDE).

cW


On 10-11-24 11:36 AM, "Robert Murrell" <community-noreply@qnx.com> wrote:

>> > Hi, Robert,
>> >
>> > WORKSPACE_ROOT would only be provided by a QNX Project when it performs the
>> > build.  If you need to build on the command-line, that doesn't help.
>> >
>> > What kind of project are you dealing with?  If it's a Makefile project
>> using
>> > the QNX Recursive Makefiles, then paths relative to PROJECT_ROOT should
>> > work.  e.g., $(PROJECT_ROOT)/../extra_inc/whatever
>> >
>> > The squiggly yellows would be addressed by adding the include paths to the
>> > "Paths and Symbols" page of the project properties.
>> >
>> > It all really depends on what kind of project you're using (managed make,
>> > makefile, or QNX).
>> >
>> > cW
> 
> The project is a QNX C++ project.  I do see PROJECT_ROOT in the output listing
> and that will work if WORKSPACE_ROOT doesn't.  There isn't a "Paths and
> Symbols" page in the project settings that I can see.
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post75819
> 
> 

-- 
Christian W. Damus
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>; 

Re: Confirm bugs in 4.7.0?  
OK IDE people, attached is a zip of a simplified workspace of my environment.  The goal is to build project_a and 
project_b so that each displays its unique banner message.  My environment is QNX 6.5.0 and Momentics 4.7.0.  Here are 
the requirements:

1. No absolute paths.

2. The editor can find all symbols and files without any red or yellow squiggly lines.

3. If ANY file, local or external, source or include, in a project is edited, when the project is built, the editor 
saves the changed file, make detects the change, and the compiler builds the project.

If you can do this, please let me know how to do it.
Attachment: Compressed file test.zip 222.66 KB