Compile PVRTModelPOD / PowerVR SDK with Xcode
Hello !
I'm having some troubles using the PowerVR SDK with my iPhone app!
I have downloaded the last SDK two days ago, imported all the files (cpp and h) needed in PVRTModelPOD.cpp/h in my iPhone opengles 2.2.1 project.
When i compile i get tons of errors! like this one :
In the PVRTGlobal.h file.
This seems to be correct c++ for me , and i'm sure it can compile without any modification...
Is there any flags to set in the project properties to activate some form of c++ ?
Thanks for your help!
I'm having some troubles using the PowerVR SDK with my iPhone app!
I have downloaded the last SDK two days ago, imported all the files (cpp and h) needed in PVRTModelPOD.cpp/h in my iPhone opengles 2.2.1 project.
When i compile i get tons of errors! like this one :
Code:
Line Location PVRTGlobal.h:158: error: syntax error before '<' tokenCode:
template <typename T>
inline void PVRTswap(T& a, T& b)
{
T temp = a;
a = b;
b = temp;
}This seems to be correct c++ for me , and i'm sure it can compile without any modification...
Is there any flags to set in the project properties to activate some form of c++ ?
Thanks for your help!
Which SDK was that ? Linux ?
I had no problem compiling it pretty much out of the box.
I had no problem compiling it pretty much out of the box.
Hi warmi, thanks for the reply !
Yes this is with the linux version of the sdk.
Do you think i should retry with the msi/windows version ?
Yes this is with the linux version of the sdk.
Do you think i should retry with the msi/windows version ?
This may not be the problem, but I think you might want to check that you're not including the file from an Obj-C source file (.m). Templates are C++ not C and the normal Obj-C (or any C) compiler won't understand them. If you find a .m file including PVRTGlobal.h either remove the include or rename the file to .mm so that XCode will use Obj-C++ instead.
IIRC I think I ended up renaming all my .m files to .mm just to avoid this problem coming up again. I think it's also possible to force XCode to compile all .h files with this compiler in some of the XCode settings as well, but I haven't actually done this myself.
IIRC I think I ended up renaming all my .m files to .mm just to avoid this problem coming up again. I think it's also possible to force XCode to compile all .h files with this compiler in some of the XCode settings as well, but I haven't actually done this myself.
Flash!
You were right flash.
I renamed my obj-c file in mm and compiles !
i just had to add two includes in the PVRTModelPOD.cpp file PVRTVertex.h and PVRTBoneBatch.h and i have no more errors!
I still don't understand how people can get it to build directly without doing all this...it's wierd.
Well thanks a lot !
I renamed my obj-c file in mm and compiles !
i just had to add two includes in the PVRTModelPOD.cpp file PVRTVertex.h and PVRTBoneBatch.h and i have no more errors!

I still don't understand how people can get it to build directly without doing all this...it's wierd.
Well thanks a lot !
KEMISTRY Wrote:I still don't understand how people can get it to build directly without doing all this...it's wierd.
Well thanks a lot !
Because I had no objective-c files to begin with .. I compiled their entire SDK as a pure static library.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| How many uniform vectors can iPad PowerVR SGX support | linghuye | 0 | 2,258 |
Aug 30, 2010 02:40 AM Last Post: linghuye |
|

