This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 183676 - #include directive cannot resolve files for Code Assistance
Summary: #include directive cannot resolve files for Code Assistance
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: PC Other
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-07 23:05 UTC by sidplayos2
Modified: 2010-05-01 05:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sidplayos2 2010-04-07 23:05:34 UTC
Overview:

Code assistance using Cygwin and NB6.8 is unable to resolve #include directive paths
using the include paths in the Projects settings if the file is located at the root of the drive.
If however, the file is located anywhere else in the directory structure it can be found.

e.g. Y:\test.hpp will not be found, however Y:\Test\test.hpp will be found. It should be noted that
this only relates to Code Assistance, compilation and linking works fine.

Steps to Reproduce:

1) Using Cygwin with NB 6.8, create a new "Welcome" C++ sample project (I used the path Y:\Test\NetBeans\Welcome)
and ensure it compiles as expected, using the Cygwin tools in the Project properties->Build settings.

2) Create a new header file "fake.hpp" in the directory 1 Level above the project (In my case Y:\Test\NetBeans\fake.hpp)
with the contents

#ifndef FAKE_HPP
#define FAKE_HPP
#endif

3) Copy the same file to the root of the drive so it sits at Y:\fake.hpp

3) Edit the welcome.cc file adding a #include "fake.hpp" above the #include <iostream> to include the newly created file

4) Edit the Welcome Project->Properties->C++ Compiler->Include Directories and add the path to Y:\Test\NetBeans using the browse button
and ensure the inherited button is ticked.

At this point you will see that the Code Assistance should work

5) Edit the Welcome Project->Properties->C++ Compiler->Include Directories and add the path to Y:\ using the browse button
and ensure the inherited button is ticked. This should now point to the fake.hpp in the root directory.

6) Press Ctrl+Alt to see that Y:/ is in the analyzed paths, but the file is not found in Code Assistance

Actual Results:

When the path is set to anything other than the root of the drive, Code Assistance works.
When the path is set to the root of the drive, the file cannot be found in the Code Assistance (although the compiling works fine).

Expected Results:

When the include file is located in the root of the drive, the file should be found in Code Assistance.

Build Date & Platform:

Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_18; Java HotSpot(TM) 64-Bit Server VM 16.0-b13
System: Windows 2003 version 5.2 running on amd64; Cp1252; en_AU (nb)
CND 1.8.3

Additional Builds and Platforms:

Untested on MinGW, although it may be the same.

Additional Information:
Topic in forum: http://forums.netbeans.org/topic9958-15.html
Comment 1 Alexander Simon 2010-04-27 14:48:37 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/474ec251eafd
Comment 2 Quality Engineering 2010-05-01 05:23:19 UTC
Integrated into 'main-golden', will be available in build *201005010200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log: