sorry guys i need some help!!!
i succesfully compiled my plugin library
in windows -> tntcollision.dll and it works with desktop player
in osx -> tntcollision.dynlib and it works with desktop player
in android -> tntcollision.so and it works with device player and compiled app.
for ios (iphone, ipad) how can i generate this static lib ? (tntcollision.a)
is there a make file ?
i can compile fine if i add my source to gideros iosPlayer so i can test on device, but i don't want to distribuite sources so i want to generate a static lib file (*.a) file but how ?
sorry but i'm not sure how to use xcode to generate *.a files
ps: my lib is *.cpp not a *.m file.
some help ? :P 8->
TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
www.tntengine.com
Comments
have you tried to create a new library project and add your .cpp files to it and then create the static .a files from that?
It will create the .h and the .a for you. Instead of running it, just build it for the device.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
ops, sometimes simple things are the ones that can not be seen!
when i'll go home i'll try.
thanks.
www.tntengine.com
but how to integrate in the player ?
and in the compiled code ?
i can't find info nowhere in gideros docs and site.
any help ?
i need just little guide like andorid plugin system.
http://www.giderosmobile.com/DevCenter/index.php/Writing_Android_plugins
why for ios i can't find anything ?
bha...
*** power without control is useless. ***
just start thinking to skip ios support.
www.tntengine.com
@gregbug,
did you try dropping the .h file into the xcode project and adding the framework (*.a) file and then compiling your app? You might also have to add the # in the xcode project to include the library.
cheers,
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
after compiling my lib i put tntcollision.a in GiderosPlayer project (under plugin folder just like libluasocket.a) then recompiled and installed on device... no errors.
but when i try to start a project that need tntcollision Gideros stop and says that it can't find tntcollision library.
sorry but i'm lost on xcode and ios...
www.tntengine.com
for # you mean #include ?
www.tntengine.com
----------
main.lua is uploading.
Uploading finished.
main.lua:19: module 'tntcollision' not found:
no field package.preload['tntcollision']
no file './tntcollision.lua'
no file '/usr/local/share/lua/5.1/tntcollision.lua'
no file '/usr/local/share/lua/5.1/tntcollision/init.lua'
no file '/usr/local/lib/lua/5.1/tntcollision.lua'
no file '/usr/local/lib/lua/5.1/tntcollision/init.lua'
no file './tntcollision.so'
no file '/usr/local/lib/lua/5.1/tntcollision.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
------------
www.tntengine.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
For libluasocket.a, I've created the project in Xcode and here is my bash script to create libluasocket.a:
i love you! man !
www.tntengine.com
I guess this is is because there is no reference to any of the hotwax library contents in the plugin or app. I'm just wondering how you do it for the libluasocket.a library; why does that get pulled in automatically?
best regards
i can now create universal binary of my lib
but do not link with my program...
i mean...
if i add tntlibcollision.a under plugins folder (on ios Player) and recompile
the player is compiled and installed... but if i try to test a demo not work...
(lib not found)...
at this point i really missing something....
:-/
www.tntengine.com
Try this. When you are building your plugin or app in Xcode go to your target and find the "Linking" section. Then add -all_load into the "Other Linker Flags". I've found this gets my library to be recognized.
I've asked @atilim, if he knows of another way to do this that doesn't require this additional step.
Best regards
Do you think there's a case for including the -all_load flag by default in the player and exported Gideros projects under iOS? Since Lua dynamically binds to the plugins there aren't any references to the plugin code down in the .cpp or .m files (unless you force one as you have done). Hence I can see this being a recurring issue if more people start to use libraries rather than just source files and it would save having to create a stub file or adding the flag manually. I don't think there should be any downside but it would be best to check that the program size doesn't increase unnecessarily.
Best regards
thanks.
now i'm at work as soon as i go home i'll try to add -all_load flag.
www.tntengine.com
ok. now works all fine.
only one thing:
xcodebuild -project luasocket.xcodeproj -alltargets -sdk iphonesimulator5.1 -configuration Release
give me error:
sdk "iphone5.1" cannot be located.
if i use iphone6.0 work but compile only for armv7 (so no ipod 2^gen my main dev target)
how can add iphone 5.1 on my config?
and if i add iphoine 5.1 sdk i need to compile armv6 and armv7 and i386 ?
(on andoid we have armv6 and 7 as separated files...)
in my system i have installed xcode 4.5.1 and xcode 4.4.1 (for armv6 support)
sorry for "dummy" questions...
www.tntengine.com
I have Xcode 4.5.1 and 4.3.1 installed and I am compiling using the latter.
best regards
and now i can compile for armv6, v7 and i386
so al my compile problems are gone!
but you guys how do you have xcode configured ?
xcode 4.4.1 can exist with xcode 4.5.1 ?
some suggestions ?
www.tntengine.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
and use the sudo command while using xcode-select.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
www.tntengine.com
or write a "stub" file like "luasocket_stub.cpp"
or is the same ? ;;)
www.tntengine.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps