Reputation: 117
I've a task in which I need to use a .a c++ library (don't have any idea what is the code in that library) with a header file having some methods declared in it. Now what I need to do is to call these methods from my objective c class. for this I've done following things:
changed the extension of my view controller class from .m to .mm
set my 'other C++ flags' in build settings to objective-c++
all other steps which were suggested at stack overflow and any where else.still I'm not able to use that library. An example will give you all the better understanding on my problem:
suppose We've a library mylibrary.a,We also have a header file named myHeaderFile.h. Now we need to call a method named 'int Login(unsigned long *LoginInfo)' which is declared in myHeaderFile.h header file. What should be done? The screen shot is the crash report when I try to call C++ method
What can be mistake here,please suggest. A quick help will be appreciated...
Upvotes: 0
Views: 381
Reputation: 3998
Attach to the app with any debugger or turn on Error Reporting to see what exactly crashes.
UPD: Apple's LLDB tutorial. You need these steps:
Finally, when it crashes, type bt, then Enter.
Upvotes: 3