views:

234

answers:

1

I have a Titanium module and i want to use it for voice over ip using pjsip. I have changed the project settings the following way:

  • added to the other linker flags the libraries from pjsip
  • added to the header search paths the headers from pjsip
  • added to the library search paths the libraries from pjsip

If i do these things for a normap iPhone app it works i can make calls i have tested it and made a wrapper class that has methods like makeCall, hangup. etc. But i want to use this class together with the libraries from pjsip in a Titanium module.

It gives me errors like:

implicit declaration of function 'pjsua_perror'
implicit declaration of function 'pjsua_destroy'
'pjsua_config' undeclared (first use in this function)

These are all part of pjsip (pjsua_perror and pjsua_destroy are functions and pjsua_config is a struct)

Does it work this way? Can i include other libraries in a library? What is the difference between making an app that uses libraries and making a library that uses libraries?

A: 

For some reason if i do

#import <pjsua.h>

it doesn't work, but if i do

#import <pjsua-lib/pjsua.h>

it compiles. The first one just contains an

#include <pjsua-lib/pjsua.h>

So it basically does the same thing.

I have no idea why it works only like this but if somebody knows....then i'll mark it as answer :)

EDIT: it doesn't work :(. It does work if I create a new static library and link pjsip, but if I create a Titanium module it doesn't work.

EDIT2: It works now, or at least I can build it. I had to modify titanium.xconfig and add my header paths to the HEADER_SEARCH_PATHS setting.

EDIT3: No, i can build it but it doesn't work. It gives error 0xE8008001 when syncing with the iPhone. I'm lost.

kudor gyozo