Hi everyone,
I am new to Momentics, but got it installed on a Linux machine and used the “10-steps to your first qnx program” to write, compile and debug a simple hello world application.
Now here is the problem:
As soon as I don’t write my code in the autogenerated helloworld.cc, but put functions in a separate file (.c and .h), I get the following error:
undefined reference to ‘add(float, float)’
I added two simple files to the project, test.c and test.h, which look like this:
test.h:
float add(float a, float b);
test.c:
float add(float a, float b) {return a+b;}
The files are both in the main project folder (like helloworld.cc) and show up on the left side in the project list view as part of the project, but it seems like Momentics is still not using the test.c file in the project.
I tried to look for any setting in the project properties where I have to define the files I want to make into my project, but I can’t find anything. I have the same problem when I use Momentics in Windows.
This is probably really stupid, but I can’t figure it out. So any help would be great.
Many thanks,
Tappo