Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Momentics compiler doesn't recognize PhAB types?: (8 Items)
   
Momentics compiler doesn't recognize PhAB types?  
I wonder if somebody can help me with this. I'm developing a Photon Appbuilder project in QNX Momentics v6.3. During the
 project build
I'm getting these errors that make it look as if the compiler didn't recognize any PhAB types, such as ApWidget_t. For 
example, I get the following compiler error

data definition has no type or storage class abwidgets.h

The line producing the error is:
ApWidget_t AbWidgets[ 68 ];
which is the only line in abwidgets.h

apparently the compiler is not recognizing the type ApWidget_t even though Appbuilder has included Photon library 
headers in the project. In fact, the header file Ap.h appears in the list of includes for the project. Can anyone tell 
me what's wrong?
RE: Momentics compiler doesn't recognize PhAB types?  
Can you post the output from the make command?

-----Original Message-----
From: Gabriel Aguirre-Ollinger [mailto:gaguirre@northwestern.edu] 
Sent: Wednesday, February 13, 2008 2:46 PM
To: momentics-community
Subject: Momentics compiler doesn't recognize PhAB types?

I wonder if somebody can help me with this. I'm developing a Photon
Appbuilder project in QNX Momentics v6.3. During the project build
I'm getting these errors that make it look as if the compiler didn't
recognize any PhAB types, such as ApWidget_t. For example, I get the
following compiler error

data definition has no type or storage class abwidgets.h

The line producing the error is:
ApWidget_t AbWidgets[ 68 ];
which is the only line in abwidgets.h

apparently the compiler is not recognizing the type ApWidget_t even though
Appbuilder has included Photon library headers in the project. In fact, the
header file Ap.h appears in the list of includes for the project. Can anyone
tell me what's wrong?

_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5008
Re: RE: Momentics compiler doesn't recognize PhAB types?  
Hi: I'm not sure if you mean the console output. In that case this is what i get:
C:/app_exo2/src/abwidgets.h:3: parse error before `AbWidgets'
C:/app_exo2/src/abwidgets.h:3: warning: type defaults to `int' in declaration of `AbWidgets'
C:/app_exo2/src/abwidgets.h:3: warning: data definition has no type or storage class

This is the whole abwidgets.h file:
/* Widget header for application - AppBuilder 2.03  */
ApWidget_t AbWidgets[ 68 ];

I get this other error in abimport.h:
C:/app_exo2/src/abimport.h:5: parse error before `AbInternalLinks'
C:/app_exo2/src/abimport.h:5: warning: type defaults to `int' in declaration of `AbInternalLinks'
C:/app_exo2/src/abimport.h:5: warning: data definition has no type or storage class

The line in question is:
extern ApEventLink_t AbInternalLinks[];
Re: RE: Momentics compiler doesn't recognize PhAB types?  
It must be that your Ap.h file is damaged or is not being picked up from the correct location. Usually ablibs.h includes
 this header.

To see what is going on, you can view the output of the preprocessor. If you cannot resolve the problem, try posting the
 preprocessed file here.

One way to get the output of the preprocessor is to use the following option to qcc: -Wc,-save-temps

This will leave behind temporary files in the compilation directory.

Regards,
Max
Re: RE: Momentics compiler doesn't recognize PhAB types?  
Well, the IDE installation is brand new, and the automatically generated list of included files in the C/C++ Project 
contains the correct path to Ap.h. The source code for Ap.h is there. So why is the compiler behaving as if it can't 
find Ap.h?
Re: RE: Momentics compiler doesn't recognize PhAB types?  
If I could always tell someone why a compiler behaves unexpectedly, I'd be a rich man.

Because I can't do this without more information, the most useful thing to me would be to see the preprocessor output. 

Thanks,
Max
Re: RE: Momentics compiler doesn't recognize PhAB types?  
I'm not sure how to generate the preprocessor output because I'm not using my own makefiles. Is there for example a way 
to make the IDE build a project with an user-supplied makefile?

Thanks,
Gabriel
Re: RE: Momentics compiler doesn't recognize PhAB types?  
> I'm not sure how to generate the preprocessor output because I'm not using my 
> own makefiles.

Use the -E compiler option to tell the qcc/gcc drivers to stop after preprocessor stage.

Regards,

Ryan Mansfield