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
Developer
stevenhaggerty
Posts: 30
Registered: ‎03-03-2012
My Device: Playbook
Accepted Solution

Confusing flags + linker error.

Hi,

 

I've basically copied the falling blocks sample project and added my source to the project.

 

For some reason my source code is getting compiled with the x86 compiler flags:

 

-V4.4.2,gcc_ntox86

 

Even thought clicking on Properties->C++ build->settings shows:

 

-V4.4.2,gcc_ntoarmv7le

 

This of course leads to a linker error and an error regarding the format of the object files.

 

I've looked at the falling blocks sample and the project settings are the same, but it gets compiled with the correct flags.

 

To add to the confusion, right clicking on the sample->src directory->c++ build->settings shows a compiler line of:

 

-V4.4.2,gcc_ntox86 !!!!

 

Anyone know whats going on? 

 

Thanks,

 

Steve.

 


-------------------------------------------------------------
Steven Haggerty,
Rubicon Development ( http://www.rubicondev.com/ )
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Confusing flags + linker error.

Go to Right-click on the project in Project explorer ->Build-Configurations->Set Active and choose Device-Debug (or Device-Release).

Developer
stevenhaggerty
Posts: 30
Registered: ‎03-03-2012
My Device: Playbook

Re: Confusing flags + linker error.

Hi there,

 

Device-debug is already set as active.

 

Steve.

-------------------------------------------------------------
Steven Haggerty,
Rubicon Development ( http://www.rubicondev.com/ )
New Contributor
denoted
Posts: 5
Registered: ‎04-09-2012
My Device: Playbook

Re: Confusing flags + linker error.

Hi Steve,

 

This is probably a little late, but I had the same problem and found a solution, although it is not the greatest one.

 

The problem is that the IDE setting a source folder to compile for x86 if you ever edit the properties of any of your source folders (ie: right clicked the folder -> properties, change samethiong -> apply).

 

I cannot figure out why this is happening or how to change it back from within the IDE.  I did reliaze that the .cproject file in the root of the project now has a 'folderInfo' elements for every source folder that I edited.  I simply just remove the 'folderInfo' element and it's children in the .cproject, refresh the project in the IDE, and everything builds for the right architecture after that.

 

Cheers,

DAve

Developer
stevenhaggerty
Posts: 30
Registered: ‎03-03-2012
My Device: Playbook

Re: Confusing flags + linker error.

Hi there,

 

Yeah, thanks for that, I found that out and emailed a guy at tech support about it. Not sure if anything has been done about it.

 

I eventually ended up creating new projects for all my libraries which seems to allow me to mess with the settings without the x86 compiler wading in. It also helps with the pitifully slow dependency checking...

 

Steve.

-------------------------------------------------------------
Steven Haggerty,
Rubicon Development ( http://www.rubicondev.com/ )