0

I have a C++ code base in XCode that has two command line targets - one defines a USE_DOUBLE macro and the other does not, allowing the codebase to conditionally typedef either float or double into a custom data type.

So basically:

#if defined(USE_DOUBLE)
typedef double MyFloat;
#else
typedef float MyFloat;
#endif

I am now trying to turn this codebase into a framework that will be used inside another application. The framework would have to contain both the float and double versions and the application making use of the framework should be able to "choose" which version to link against.

I've looked at Apple's docs but their pages on frameworks with multiple versions doesn't really deal with how to handle a situation like this.

Sunny724
  • 156
  • 2
  • 12
  • Why do you want to do this? – Emil Laine Oct 02 '15 at 07:56
  • Because of the nature of the project, some hardware will not be able to run it using double precision (it will be making use GPU). So it needs to be able to support either/or depending on where its being run – Sunny724 Oct 02 '15 at 08:01

0 Answers0