Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: CiriousJoker on January 28, 2015, 03:04:10 pm
-
So here's what i have:
I've started a plain c++ project and i wanna make a little game to practise.
Now my sample c++ class test works, and the library sample (nRGB) works too.
But i'm stuck at that point where i want to combine them. It always says something like:
undefined reference to `<every function i wanted to use out of the library>'
I tried this for days now, would be awesome if someone could tell a noob what to do :3
Solution:
extern "C" {
#include <nGEO.h>
...
}
-
(I couldn't take a look at your source - I'm on mobile, so this post may be useless)
Did you surround the nRGB header #include in an 'extern "C" {}' block?
It's needed because of C++ name mangling.
-
Also see http://www.parashift.com/c++-faq/include-c-hdrs-nonsystem.html.
-
<3 you, thx :)
Didnt think of something like incompatibility.
Thought its all the same with less functions and that c++ compilers would notice if a file has .c attached to it ...
ps.: @Vogtinator isnt it also 2am for you here in germany?