Game Development Community

IOS library integration with Torque2D

by Tap Tandon · in Torque 2D Beginner · 02/25/2015 (9:23 pm) · 6 replies

When i compile Torque2D Xcode project(/compilers/Xcode_iOS) i get errors as "Apple Mach-O linker error --- (null): "_jinit_1pass_quantizer", referenced from:".

Then i changed my build settings under "Compile source as --- Objective-C++". Again i get some errors as
" /Torque2D-3.1-osx/engine/lib/ljpeg/jmemansi.c:103:31: Cannot initialize a parameter of type 'unsigned char *' with an lvalue of type 'void *'""

So just want to know how can i integrate my iOS lib(written in pure Objective-C) with Torque2D?

About the author

Recent Threads


#1
02/26/2015 (6:23 am)
Do you get this error out of the box before modification? What modifications have you made? Which version of Xcode, OS X, iOS SDK are you using?
#2
03/14/2015 (10:00 am)
No before making modifications i don't get the error.but when i add iOS .a lib in project i get this error. Xcode version is 6.1 and iOS sdks is 8.1.. apart from this is the process of adding iOS lib directly in Torque2D Xcode project(/compilers/Xcode_iOS) right or wrong?? or do i need to follow some other process of linking my lib in torque2d kit version?
#3
03/15/2015 (9:21 pm)
Integrating an iOS library into Torque 2D is as straight forward as any other iOS project. It sounds like the library uses Objective-C files (.m) and Torque 2D only supports Objective-C++ (.mm), since it is a C++ based engine. Again, what's the library?
#4
03/15/2015 (9:52 pm)
its a static library (MyLibrary.a). and ya it has objective-c files which is not a problem because we can use objective-c files in .mm..will we always have Torque2D Xcode project(/compilers/Xcode_iOS)??If i want to develop a torque2d game/application for iOS, can i use torque2d Xcode project??
#5
03/16/2015 (7:34 am)
Quote:a it has objective-c files which is not a problem because we can use objective-c files in .mm
So you can confirm the library was built using .mm file, not .m?

Quote:If i want to develop a torque2d game/application for iOS, can i use torque2d Xcode project??
Yes. Other libs have been integrated into T2D successfully. For example, the Leap Motion library is currently integrated. Perhaps you should look at that and see if you can follow the example.
#6
03/24/2015 (10:36 pm)
thanks for the reply...i integrated iOS library into Torque 2D as any other iOS project i.e. adding library in bundle phase->link binary with libraries and using that. Can i integrate with the same process in Torque3D?