Linking in Objective-C

Member
Posts: 241
Joined: 2008.07
Post: #1
I have a pair of files: Math3d.h and Math3d.cpp that I am trying to import into an iPhone project. The math functions are for use with OpenGL ES.

These files are not a class. The .h contains mostly inline functions and some function declarations that are defined in the .cpp counterpart.

I am having a problem getting this to link. If nothing references any function in these files, it compiles just fine. It's when I try to use one of the function, it acts like it doesn't know what to do.

I am #include ing the file where I need to use it and I'm #ifndef ... #define ... #endif ing the .h to prevent multiple includes.

This file was taken directly from a C++ project that was working perfectly. Can somebody please tell me what I have to do to reference a static function in Objective C? Tell me it doesn't have to be part of a class just to reference a function. Thanks.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Quote this message in a reply
Member
Posts: 241
Joined: 2008.07
Post: #3
I actually fixed this by putting
Code:
static
before every inline function.
Quote this message in a reply
Post Reply