09-18-2012 12:36 PM
First things first... This is the IDE I'm using:
QNX Momentics IDE for BlackBerry Native SDK for Tablet OS
Build id: 201202171813
I imported an assembly file from another project I worked on (.s extension). I started getting a linker error when I referenced one of the functions in the file. The project was picking up the declaration of the function in the header file (.h), but not the definition in the (.s) file.
The first thing I found was an article on how the IDE requires the .s extension to be upper case. I changed the file extension to upper case. In addition, I also did the following to have lower case extensions recognised and treated as assembly files:
Project -> Properties -> C/C++General -> File Types ->New
Pattern = *.s
Type = Assembly Source File
After noticing that there were no compilation errors, but that the linker still couldn't find the function I checked for the object file (.o), and sure enough no file had been generated.
I then tried to build just the assembly file (right click -> Build Selected File(s)).
This is what I get in Console:
Rebuilding selected file(s)
**** Internal Builder is used for build ****
Adding #error preprocessor defines throws no error. Adding undefined #define tags around code doesn't trigger any kind of syntax highlighting in the editor as it does in a c/cpp/h file.
These are my QCC Assembler settings (Project -> Properties -> C/C++ Build -> Settings -> QCC Assembler):
All options: -V4.4.2,gcc_ntoarmv7le_cpp -w1 -c -DUSING_GL11=1 -g
In case anyone asks, I can't post the source for this (contractual agreement).
Is there anything that anyone could suggest to get this working? Has anyone had a similar issue and resolved it?
Solved! Go to Solution.
09-20-2012 11:45 AM - edited 09-20-2012 11:46 AM
I actually believe it's this bug:
I noticed that the .cpp file has an "adornment" on the file icon. It looks like a wrench or key. It appears to be a bug in Momentics/Eclipse that causes the compiler to fall over with an unspecified error (null). I renamed the .s file to .S and also renamed the .cpp file. I'm going to hazard a guess that renaming the files was the cause.
The workaround for this: