05-12-2012 09:54 PM
Hey guys, Really need help here. Ive compiled an Unrar Commandline to Playbook and it works brilliantly. What Im trying to do now is include the generated .so file in the ANE Example (http://supportforums.blackberry.com/t5/Adobe-AIR-DRAROpenArchiveEx seems to work but I am unable to create a RAROpenArchiveDataEx struct. What am I doing wrong? Ive only ever used libs and dll so this is new to me. ANY HELP WOULD REALLY BE APRICIATED! Ive included the library.
05-13-2012 10:08 AM - edited 05-13-2012 10:09 AM
Where in the process are you exactly?
Let me make some assumptions so that I can understand better
You have created the ANE project, right-click project -> configure -> add library -> add your .so
Created your methods (that your actionscript will call, but under the hood will call your unrar library) and exposed them through ContextInitializer
Then, build the ANE and exported it to an ANE file
Created the ActionScript library, added the Native Extension to the project, written the methods that call the exposed methods from the ANE
and then while trying to call an exposed method, under the hood (inside an ANE method) you are calling RAROpenArchiveEx, which is working, but creating a RAROpenArchiveDataEx struct is failing.
Is this correct?
05-13-2012 10:33 AM
ive gotten up the created methods for actionscript to call and tested the hello world method, but once I add the unrar library, I get errors because the structs arent defined. Ive included a screenshot
05-13-2012 01:08 PM
Oh ok it looks like you will need to add the directory that includes the unrar header files to your "includes" for the ANE project.
and then you should be able to include the appropriate header files in your main.c for whatever code you need
05-13-2012 10:39 PM
Well that was a definate step in the right deirection, now theres a new problem with the header, seems like QNX doesnt like alot of the variable types in it (HEADER, PASCAL eg), any clue to why? ive included the header if you wanna take a look.
05-14-2012 10:01 AM
It looks like the define _UNIX is defined in raros.hpp, so be sure to include raros.hpp before dll.hpp
#include"raros.hpp" #include"dll.hpp"
That should at least allow the project to build.
Then you should be able to start using the code like this (at least I think):
struct RARHeaderData *header;
05-14-2012 10:17 AM
BRILLIANT!!! NOW ITS WORKING!! THANKS SO MUCH JAMES!
06-02-2012 03:20 AM
new problem![]()
ANE wasnt actually doing anything even though it compiled and seemed to work, so i put the code into a qne c++ project and everything seems look alright, but when im building i get an error of
"C:\Users\Andrew\NDKProjects\HelloWorldConsole\src
C:\Users\Andrew\NDKProjects\HelloWorldConsole\src/
C:\Users\Andrew\NDKProjects\HelloWorldConsole\src/
cc: C:/bbndk-2.0.1/host/win32/x86/usr/bin/ntoarm-ld caught signal 1"
anymore help would be greatly appriciated
06-02-2012 05:41 AM
Have you linked against the unrar shared library you built? You included the header files -- now you gotta link your app to libunrar.so.
06-02-2012 05:50 AM
you mean by including the library in the projects properties?