Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - IDE 5.0 + Parser/Codan: (11 Items)
   
IDE 5.0 + Parser/Codan  
Create a new QNX C++ project in a brand new workspace

#include <cstdlib>
#include <iostream>
#include <stdio.h>

int main(int argc, char *argv[]) {
	FILE *f;
	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
	return EXIT_SUCCESS;
}

The IDE says FILE could not be resolved.  I try changing stdio.h to cstdio, no change. Only solution is to change FILE 
to std::FILE.  If I ask the IDE to find the header file for FILE, it add "using std::FILE" and the error goes aways.

I posted on the codan site but was told it was a setup issue.   
Re: IDE 5.0 + Parser/Codan  
right click on project and select Index (that would re-index the project - usually solves my problems)

On 08/22/2011 11:18 AM, Mario Charest wrote:
> Create a new QNX C++ project in a brand new workspace
> 
> #include <cstdlib>
> #include <iostream>
> #include <stdio.h>
> 
> int main(int argc, char *argv[]) {
> 	FILE *f;
> 	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
> 	return EXIT_SUCCESS;
> }
> 
> The IDE says FILE could not be resolved.  I try changing stdio.h to cstdio, no change. Only solution is to change FILE
 to std::FILE.  If I ask the IDE to find the header file for FILE, it add "using std::FILE" and the error goes aways.
> 
> I posted on the codan site but was told it was a setup issue.   
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88249
> 
RE: IDE 5.0 + Parser/Codan  

> -----Message d'origine-----
> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> Envoyé : 22 août 2011 11:28
> À : general-ide
> Objet : Re: IDE 5.0 + Parser/Codan
> 
> right click on project and select Index (that would re-index the project -
> usually solves my problems)

It doesn't.

> 
> On 08/22/2011 11:18 AM, Mario Charest wrote:
> > Create a new QNX C++ project in a brand new workspace
> >
> > #include <cstdlib>
> > #include <iostream>
> > #include <stdio.h>
> >
> > int main(int argc, char *argv[]) {
> > 	FILE *f;
> > 	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
> > 	return EXIT_SUCCESS;
> > }
> >
> > The IDE says FILE could not be resolved.  I try changing stdio.h to cstdio, no
> change. Only solution is to change FILE to std::FILE.  If I ask the IDE to find the
> header file for FILE, it add "using std::FILE" and the error goes aways.
> >
> > I posted on the codan site but was told it was a setup issue.
> >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post88249
> >
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88251
> 
Re: IDE 5.0 + Parser/Codan  
Yeah I can reproduce it. Not sure how to fix yet (except disable this error type)

On 08/22/2011 12:05 PM, Mario Charest wrote:
> 
> 
>> -----Message d'origine-----
>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
>> Envoyé : 22 août 2011 11:28
>> À : general-ide
>> Objet : Re: IDE 5.0 + Parser/Codan
>>
>> right click on project and select Index (that would re-index the project -
>> usually solves my problems)
> 
> It doesn't.
> 
>>
>> On 08/22/2011 11:18 AM, Mario Charest wrote:
>>> Create a new QNX C++ project in a brand new workspace
>>>
>>> #include <cstdlib>
>>> #include <iostream>
>>> #include <stdio.h>
>>>
>>> int main(int argc, char *argv[]) {
>>> 	FILE *f;
>>> 	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
>>> 	return EXIT_SUCCESS;
>>> }
>>>
>>> The IDE says FILE could not be resolved.  I try changing stdio.h to cstdio, no
>> change. Only solution is to change FILE to std::FILE.  If I ask the IDE to find the
>> header file for FILE, it add "using std::FILE" and the error goes aways.
>>>
>>> I posted on the codan site but was told it was a setup issue.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> General
>>> http://community.qnx.com/sf/go/post88249
>>>
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post88251
>>
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88255
RE: IDE 5.0 + Parser/Codan  

> -----Message d'origine-----
> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> Envoyé : 22 août 2011 12:58
> À : general-ide
> Objet : Re: IDE 5.0 + Parser/Codan
> 
> Yeah I can reproduce it. Not sure how to fix yet (except disable this error
> type)

If it helps: the same is true for some structure such as struct tm, every member give "Field .. could not be resolved". 
If I use using std::tm, all the errors a going away. 

Currenty I have to disable "Type is unresolved, Field is unresolved and symbol is unresolved" otherwise the code is 
litter with these errors.

Thanks.

> 
> On 08/22/2011 12:05 PM, Mario Charest wrote:
> >
> >
> >> -----Message d'origine-----
> >> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> >> Envoyé : 22 août 2011 11:28
> >> À : general-ide
> >> Objet : Re: IDE 5.0 + Parser/Codan
> >>
> >> right click on project and select Index (that would re-index the
> >> project - usually solves my problems)
> >
> > It doesn't.
> >
> >>
> >> On 08/22/2011 11:18 AM, Mario Charest wrote:
> >>> Create a new QNX C++ project in a brand new workspace
> >>>
> >>> #include <cstdlib>
> >>> #include <iostream>
> >>> #include <stdio.h>
> >>>
> >>> int main(int argc, char *argv[]) {
> >>> 	FILE *f;
> >>> 	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
> >>> 	return EXIT_SUCCESS;
> >>> }
> >>>
> >>> The IDE says FILE could not be resolved.  I try changing stdio.h to
> >>> cstdio, no
> >> change. Only solution is to change FILE to std::FILE.  If I ask the
> >> IDE to find the header file for FILE, it add "using std::FILE" and the error
> goes aways.
> >>>
> >>> I posted on the codan site but was told it was a setup issue.
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> General
> >>> http://community.qnx.com/sf/go/post88249
> >>>
> >>
> >>
> >>
> >> _______________________________________________
> >>
> >> General
> >> http://community.qnx.com/sf/go/post88251
> >>
> >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post88255
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88257
Re: IDE 5.0 + Parser/Codan  
If I include
using namespace std;
after includes it works. In c++ aren't you suppose to say that to use these c types?

On 08/22/2011 01:51 PM, Mario Charest wrote:
> 
> 
>> -----Message d'origine-----
>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
>> Envoyé : 22 août 2011 12:58
>> À : general-ide
>> Objet : Re: IDE 5.0 + Parser/Codan
>>
>> Yeah I can reproduce it. Not sure how to fix yet (except disable this error
>> type)
> 
> If it helps: the same is true for some structure such as struct tm, every member give "Field .. could not be resolved"
. If I use using std::tm, all the errors a going away. 
> 
> Currenty I have to disable "Type is unresolved, Field is unresolved and symbol is unresolved" otherwise the code is 
litter with these errors.
> 
> Thanks.
> 
>>
>> On 08/22/2011 12:05 PM, Mario Charest wrote:
>>>
>>>
>>>> -----Message d'origine-----
>>>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
>>>> Envoyé : 22 août 2011 11:28
>>>> À : general-ide
>>>> Objet : Re: IDE 5.0 + Parser/Codan
>>>>
>>>> right click on project and select Index (that would re-index the
>>>> project - usually solves my problems)
>>>
>>> It doesn't.
>>>
>>>>
>>>> On 08/22/2011 11:18 AM, Mario Charest wrote:
>>>>> Create a new QNX C++ project in a brand new workspace
>>>>>
>>>>> #include <cstdlib>
>>>>> #include <iostream>
>>>>> #include <stdio.h>
>>>>>
>>>>> int main(int argc, char *argv[]) {
>>>>> 	FILE *f;
>>>>> 	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
>>>>> 	return EXIT_SUCCESS;
>>>>> }
>>>>>
>>>>> The IDE says FILE could not be resolved.  I try changing stdio.h to
>>>>> cstdio, no
>>>> change. Only solution is to change FILE to std::FILE.  If I ask the
>>>> IDE to find the header file for FILE, it add "using std::FILE" and the error
>> goes aways.
>>>>>
>>>>> I posted on the codan site but was told it was a setup issue.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> General
>>>>> http://community.qnx.com/sf/go/post88249
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> General
>>>> http://community.qnx.com/sf/go/post88251
>>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> General
>>> http://community.qnx.com/sf/go/post88255
>>
>>
>>
>> _______________________________________________
>>
>> General
>> http://community.qnx.com/sf/go/post88257
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88258
RE: IDE 5.0 + Parser/Codan  

> -----Message d'origine-----
> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> Envoyé : 22 août 2011 14:01
> À : general-ide
> Objet : Re: IDE 5.0 + Parser/Codan
> 
> If I include
> using namespace std;
> after includes it works. In c++ aren't you suppose to say that to use these c
> types?

It should be "implicit" otherwise imagine the chaos it would create, all the C programs in the world  would not compile 
in C++.

That for example in time.h at the bottom of the file you can see that there are a bunch of using _CSTD that are 
performed on functions and structure.  According to the IDE  _STD_USING isn't defined and that section is grey out. But 
If I compile the code the compiler does define _STD_USING.

I tried  adding #define _STD_USING before the call to time.h, to force the CDT to handle it properly, but to no avail. 
Something, somewhere is forcing _STD_USING to be undefined.

Maybe it has something to do with the header files specified in the "Files to index up-front".
 
> 
> On 08/22/2011 01:51 PM, Mario Charest wrote:
> >
> >
> >> -----Message d'origine-----
> >> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> >> Envoyé : 22 août 2011 12:58
> >> À : general-ide
> >> Objet : Re: IDE 5.0 + Parser/Codan
> >>
> >> Yeah I can reproduce it. Not sure how to fix yet (except disable this
> >> error
> >> type)
> >
> > If it helps: the same is true for some structure such as struct tm, every
> member give "Field .. could not be resolved". If I use using std::tm, all the
> errors a going away.
> >
> > Currenty I have to disable "Type is unresolved, Field is unresolved and
> symbol is unresolved" otherwise the code is litter with these errors.
> >
> > Thanks.
> >
> >>
> >> On 08/22/2011 12:05 PM, Mario Charest wrote:
> >>>
> >>>
> >>>> -----Message d'origine-----
> >>>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> >>>> Envoyé : 22 août 2011 11:28
> >>>> À : general-ide
> >>>> Objet : Re: IDE 5.0 + Parser/Codan
> >>>>
> >>>> right click on project and select Index (that would re-index the
> >>>> project - usually solves my problems)
> >>>
> >>> It doesn't.
> >>>
> >>>>
> >>>> On 08/22/2011 11:18 AM, Mario Charest wrote:
> >>>>> Create a new QNX C++ project in a brand new workspace
> >>>>>
> >>>>> #include <cstdlib>
> >>>>> #include <iostream>
> >>>>> #include <stdio.h>
> >>>>>
> >>>>> int main(int argc, char *argv[]) {
> >>>>> 	FILE *f;
> >>>>> 	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
> >>>>> 	return EXIT_SUCCESS;
> >>>>> }
> >>>>>
> >>>>> The IDE says FILE could not be resolved.  I try changing stdio.h
> >>>>> to cstdio, no
> >>>> change. Only solution is to change FILE to std::FILE.  If I ask the
> >>>> IDE to find the header file for FILE, it add "using std::FILE" and
> >>>> the error
> >> goes aways.
> >>>>>
> >>>>> I posted on the codan site but was told it was a setup issue.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>>
> >>>>> General
>...
Re: IDE 5.0 + Parser/Codan  
Yes, remove cstdio from the pre-indexed file list and it will magically work

On 08/22/2011 02:10 PM, Mario Charest wrote:
> 
> 
>> -----Message d'origine-----
>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
>> Envoyé : 22 août 2011 14:01
>> À : general-ide
>> Objet : Re: IDE 5.0 + Parser/Codan
>>
>> If I include
>> using namespace std;
>> after includes it works. In c++ aren't you suppose to say that to use these c
>> types?
> 
> It should be "implicit" otherwise imagine the chaos it would create, all the C programs in the world  would not 
compile in C++.
> 
> That for example in time.h at the bottom of the file you can see that there are a bunch of using _CSTD that are 
performed on functions and structure.  According to the IDE  _STD_USING isn't defined and that section is grey out. But 
If I compile the code the compiler does define _STD_USING.
> 
> I tried  adding #define _STD_USING before the call to time.h, to force the CDT to handle it properly, but to no avail.
 Something, somewhere is forcing _STD_USING to be undefined.
> 
> Maybe it has something to do with the header files specified in the "Files to index up-front".
>  
>>
>> On 08/22/2011 01:51 PM, Mario Charest wrote:
>>>
>>>
>>>> -----Message d'origine-----
>>>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
>>>> Envoyé : 22 août 2011 12:58
>>>> À : general-ide
>>>> Objet : Re: IDE 5.0 + Parser/Codan
>>>>
>>>> Yeah I can reproduce it. Not sure how to fix yet (except disable this
>>>> error
>>>> type)
>>>
>>> If it helps: the same is true for some structure such as struct tm, every
>> member give "Field .. could not be resolved". If I use using std::tm, all the
>> errors a going away.
>>>
>>> Currenty I have to disable "Type is unresolved, Field is unresolved and
>> symbol is unresolved" otherwise the code is litter with these errors.
>>>
>>> Thanks.
>>>
>>>>
>>>> On 08/22/2011 12:05 PM, Mario Charest wrote:
>>>>>
>>>>>
>>>>>> -----Message d'origine-----
>>>>>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
>>>>>> Envoyé : 22 août 2011 11:28
>>>>>> À : general-ide
>>>>>> Objet : Re: IDE 5.0 + Parser/Codan
>>>>>>
>>>>>> right click on project and select Index (that would re-index the
>>>>>> project - usually solves my problems)
>>>>>
>>>>> It doesn't.
>>>>>
>>>>>>
>>>>>> On 08/22/2011 11:18 AM, Mario Charest wrote:
>>>>>>> Create a new QNX C++ project in a brand new workspace
>>>>>>>
>>>>>>> #include <cstdlib>
>>>>>>> #include <iostream>
>>>>>>> #include <stdio.h>
>>>>>>>
>>>>>>> int main(int argc, char *argv[]) {
>>>>>>> 	FILE *f;
>>>>>>> 	std::cout << "Welcome to the QNX Momentics IDE" << std::endl;
>>>>>>> 	return EXIT_SUCCESS;
>>>>>>> }
>>>>>>>
>>>>>>> The IDE says FILE could not be resolved.  I try changing stdio.h
>>>>>>> to cstdio, no
>>>>>> change. Only solution is to change FILE to std::FILE.  If I ask the
>>>>>> IDE to find the header file for FILE, it add "using std::FILE" and
>>>>>> the...
View Full Message
Re: RE: IDE 5.0 + Parser/Codan  
> 
> 
> > -----Message d'origine-----
> > De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> > Envoyé : 22 août 2011 14:01
> > À : general-ide
> > Objet : Re: IDE 5.0 + Parser/Codan
> > 

> 
> Maybe it has something to do with the header files specified in the "Files to 
> index up-front".

If I remove cstdio from the list, problem with FILE* goes away. If I remove ctime from the list problem with struct tm 
goes away!

This is what the list look like by default:

cstdarg, stdarg.h, stddef.h, sys/resource.h, ctime, sys/types.h, signal.h, cstdio

I just tried removing all the C++ related header and thinks are looking good so far.

>  
> > 
> > On 08/22/2011 01:51 PM, Mario Charest wrote:
Re: IDE 5.0 + Parser/Codan  
You can leave all that does not start with "c". Modify you global preference for workspace too.

On 08/22/2011 02:18 PM, Mario Charest wrote:
>>
>>
>>> -----Message d'origine-----
>>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
>>> Envoyé : 22 août 2011 14:01
>>> À : general-ide
>>> Objet : Re: IDE 5.0 + Parser/Codan
>>>
> 
>>
>> Maybe it has something to do with the header files specified in the "Files to 
>> index up-front".
> 
> If I remove cstdio from the list, problem with FILE* goes away. If I remove ctime from the list problem with struct tm
 goes away!
> 
> This is what the list look like by default:
> 
> cstdarg, stdarg.h, stddef.h, sys/resource.h, ctime, sys/types.h, signal.h, cstdio
> 
> I just tried removing all the C++ related header and thinks are looking good so far.
> 
>>  
>>>
>>> On 08/22/2011 01:51 PM, Mario Charest wrote:
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88262
RE: IDE 5.0 + Parser/Codan  
> -----Message d'origine-----
> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> Envoyé : 22 août 2011 14:22
> À : general-ide
> Objet : Re: IDE 5.0 + Parser/Codan
> 
> You can leave all that does not start with "c". Modify you global preference
> for workspace too.

I did that , but had to add time.h and put it in front of the list to get some of the time.h related stuff to work.  I 
didn`t spent time to check where exactly it the list it could be at, I know at the end it did work.

> 
> On 08/22/2011 02:18 PM, Mario Charest wrote:
> >>
> >>
> >>> -----Message d'origine-----
> >>> De : Elena Laskavaia [mailto:community-noreply@qnx.com]
> >>> Envoyé : 22 août 2011 14:01
> >>> À : general-ide
> >>> Objet : Re: IDE 5.0 + Parser/Codan
> >>>
> >
> >>
> >> Maybe it has something to do with the header files specified in the
> >> "Files to index up-front".
> >
> > If I remove cstdio from the list, problem with FILE* goes away. If I remove
> ctime from the list problem with struct tm goes away!
> >
> > This is what the list look like by default:
> >
> > cstdarg, stdarg.h, stddef.h, sys/resource.h, ctime, sys/types.h,
> > signal.h, cstdio
> >
> > I just tried removing all the C++ related header and thinks are looking good
> so far.
> >
> >>
> >>>
> >>> On 08/22/2011 01:51 PM, Mario Charest wrote:
> >
> >
> >
> >
> > _______________________________________________
> >
> > General
> > http://community.qnx.com/sf/go/post88262
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88263