compiling winrar for use in android

Hi all,

I am a java developer so bear with me. I am trying to compile the unrar source http://www.rarlab.com/rar_add.htm so I can use in an android application via jni. I have successfully compiled it and even was successful in making a jni call. From within the c++ jni method, I want to call the main function in rar.cpp which I think is where this program starts execution. I added some logging so I can see what is executing and right now the main function does not execute because it has this if condition that I needed to remove in order for it to execute.

#if !defined(GUI) && !defined(RARDLL)
int main(int argc, char *argv[])
{
.....
}
#endif

But I couldn't find GUI or RARDLL being defined anywhere in the source so I am a little curious why this if statement did not pass and let main run. There are a bunch of these type of if statements all over and I don't want to start commenting it out so I want to know of a simpler approach.

Using windows with cygwin, but unrar needs to run on android so linux.
Last edited on
Topic archived. No new replies allowed.