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 104733 - Does not correctly recognize ISO C++ header file
Summary: Does not correctly recognize ISO C++ header file
Status: RESOLVED DUPLICATE of bug 89872
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 13:58 UTC by Sanjeeb Sahoo
Modified: 2007-05-25 14:05 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 Sanjeeb Sahoo 2007-05-24 13:58:19 UTC
In my project settings, I have specified all the default header file directories
that my Sun C++ compiler (version 5.7) searches. When I tried to include the ISO
C++ standard header file called *cstdlib* in my C++ source, the editor did *not*
recognize the same and annotated the line as an error. My source code compiles
fine. 
To reproduce, open a new C++ source and write the following line:

#include <cstdlib>

I should mention that in Sun's compiler distribution, there is no file named
cstdlib. The C++ preprocessor automatically maps cstdlib to an implementation
specific file, which I think is cstdlib.SUNWCCh. NetBeans should be able to do
similar mapping instead of showing an error for a standard header file inclusion.
Comment 1 Vladimir Voskresensky 2007-05-25 09:26:55 UTC
What is the version of cnd do you use?
I've put in my PATH variable Sun Studio 10 and the 
#include <cstdlib>
was correctly recognized, I can hyperlink into it

Btw, there is cstdlib file in SS10 distribution.

#find . -name "cstdlib*"
./opt/SUNWspro/prod/include/CC/cstdlib.SUNWCCh
./opt/SUNWspro/prod/include/CC/std/cstdlib
./opt/SUNWspro/prod/include/CC/stlport4/cstdlib.SUNWCCh
./opt/SUNWspro/prod/include/CC/stlport4/cstdlib

May be IDE should be restarted?
Comment 2 Sanjeeb Sahoo 2007-05-25 10:51:16 UTC
I am using cnd version 5.5, which I recently downloaded from netbeans.org.
The PATH variable in shell where IDE is started has /opt/studio10/SUNWspro/bin/,
which is where Sun C++ compiler resides in my system. 
In the Sun C++ compiler options under C++ options settings of my IDE, I don't
see /opt/studio10/SUNWspro/prod/include/CC/std being listed. I see only the
following directories listed there:
-xbuiltin
/opt/studio10/SUNWspro/prod/include/CC/Cstd
/opt/studio10/SUNWspro/prod/include/CC
/opt/studio10/SUNWspro/prod/include/CC/rw7 /opt/studio10/SUNWspro/prod/include/cc
/usr/include.

I have not changed these settings. I have restarted my IDE as well. 

By the way, why is -xbuiltin listed as one of the directories? Do you use 'CC
-dryrun' to get the list of default include directories?

Thanks,
Sahoo
Comment 3 Vladimir Voskresensky 2007-05-25 14:01:59 UTC
-xbuiltin bug was fixed http://www.netbeans.org/issues/show_bug.cgi?id=89872
yesterday NB and CND 5.5.1 were released, please try it and check if it works
for you.
CND 5.5.1 is OK to work in NB 5.5 as well.
Comment 4 Vladimir Voskresensky 2007-05-25 14:03:04 UTC
closing as duplicate

*** This issue has been marked as a duplicate of 89872 ***
Comment 5 Vladimir Voskresensky 2007-05-25 14:05:59 UTC
and yes, we use CC -xdryrun to extract predefined include paths.

Thanks,
Vladimir.