Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 3
Registered: ‎12-15-2012
My Device: None
My Carrier: Bell

Q_DECL_EXPORT Syntax Error

I am just beginning to experiment with Cascades development.  I have followed several tutorials and what not, done the HelloWorld stuff.  But I decided to try the Sample Apps and I have run into a problem and I can't seem to find an answer for it.

 

Basically  in a couple of the sample apps (https://developer.blackberry.com/cascades/sampleapps/) specifically "photobomber", in main.cpp there is a syntax error.

 

Q_DECL_EXPORT int main(int argc, char **argv)

 

If I remove the Q_DECL_EXPORT from the statement the syntax error goes away.  Is there a library I'm supposed to have loaded to get Q_DECL_EXPORT to work.  Or is there some configuration element that I have set wrong.  This is rather frustrating.   I have spent way too much time on google now, trying to figure out what I'm doing wrong and as such here I am, asking for help.  Hopefully someone else has run into this before and can assist me.

 

For the record I have downloaded and installed installer-bbndk-bb10_0_09-win32-1673-201212072306-201212091625,  BlackBerry10Simulator-Installer-BB10_0_09-1673-Win-201212090321 & BlackBerry-Air-SDK-Installer-3.0.0-Win-201212071024.  I know the air SDK is illrelevant to this issue, but its been installed so I thought I would list it.

 

 

Developer
Posts: 18
Registered: ‎11-08-2012
My Device: Blackberry 10 Dev Alpha B
My Carrier: ??

Re: Q_DECL_EXPORT Syntax Error

I think Q_DECL_EXPORT is by default appended and added in the SDK Gold version. In Beta 2, my apps didn't have this keyword.

 

Pls. check this out: https://developer.blackberry.com/cascades/reference/sharedlibrary.html

 

Pls also check if QtCore and QtDeclarative are included in your libraries, one of these two is the library for that.

If you find my post helpful, please click like :smileyhappy:
New Developer
Posts: 3
Registered: ‎12-15-2012
My Device: None
My Carrier: Bell

Thanks

Thanks for your assistance.  I got the file to compile last night with the syntax error.  Nice to know that I was not losing my mind.