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
Posts: 36
Registered: ‎01-16-2013
My Device: Z10
My Carrier: Telus
Accepted Solution

IDE compilation: mismatched target CPU between compiler and linker

[ Edited ]

Hi, 

When I compile my project it gives a link error:

 

G:\bbndk\host_10_0_9_534\win32\x86\usr\bin\ntoarm-ld: src\main.o: Relocations in generic ELF (EM: 3)
src\main.o: could not read symbols: File in wrong format

 

Looking at the compile commands I'm seeing the object files being created with -V4.6.3,gcc_ntox86_cpp and the linker trying to use -V4.6.3,gcc_ntoarmv7le_cpp

 

If I right click on the project and select Properties, is specifies the target as ARM v7 and the compiler/assembler/linker options including -V4.6.3,gcc_ntoarmv7le_cpp which is correct.  But if I right click the "src" dir and select properties is says -V4.6.3,gcc_ntox86_cpp which is giving the conflict.  Where did it get this from?

 

I tried "Restore default" and changing the options around but it didn't correct the problem.   Is this a bug?   How can I fix the "-V4.6.3,gcc_ntox86_cpp" issue?   Is there something I'm not seeing?  Do I have to manually edit the .project files to fix the problem?

 

The IDE version is

Version: 10.1.0
Build id: v201302012246

 

Thanks!

 

Developer
Posts: 36
Registered: ‎01-16-2013
My Device: Z10
My Carrier: Telus

Re: IDE compilation: mismatched target CPU between compiler and linker

Solved my own problem.   Went to the individual cpp files and selected "Resource Configurations" -> reset to default.   Not sure why it had selected x86 before and the target change didn't propogate.

Developer
Posts: 47
Registered: ‎11-23-2010
My Device: Q10
My Carrier: Rogers

Re: IDE compilation: mismatched target CPU between compiler and linker

I spent whole evening yesterday trying to solve exact same problem, can't try your solution right now, but as soon as I get home will check it.
Developer
Posts: 47
Registered: ‎11-23-2010
My Device: Q10
My Carrier: Rogers

Re: IDE compilation: mismatched target CPU between compiler and linker

Ok, I managed to fix this "x86" and "arm" problem. However in my case the "Reset to default..." menu for each source file was disabled. But it was enabled for the whole "src" folder. So I did reset and built after that. Everything was built for ARM.