saravnandm / pjsip2.5-g729codec

g729 codec integration with pjsip 2.5
19 stars 7 forks source link

PJSIP compilation for all archietecture #5

Closed meghaParmar closed 8 years ago

meghaParmar commented 8 years ago

After applying patches to PJSIP library for G729, It is able to compile library with only architecture arm64. If I try to build them with different architecture, It gives following error. Undefined symbols for architecture armv7s: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [../bin/samples/arm-apple-darwin9/pjsua2_demo] Error 1 make[2]: *** [pjsua2_demo] Error 2 make[1]: *** [samples] Error 2 make: *** [all] Error 1

Please guide me if any particular settings for different architecture is required

dmsaravanan commented 8 years ago

To fix this issue, just simply run

$ make clean $ rm pjsip-apps/build/output/pjsua2_sample-arm-apple-darwin9/pjsua2_demo.o

And then, go ahead and run the compile command.

meghaParmar commented 8 years ago

@saravanandm Your solution perfectly worked for me. Thank you so much for your precious time. But the problem is : I tried to compile library for all architecture with http://www.sillycodes.com/2014/09/compiling-pjsip-for-different.html . But after that if I build project , it again shows linker errors. Steps I followed:

  1. Compiled for ARMV7s
  2. make clean
  3. Compiled for ARM64
  4. make clean
  5. Compiled for i386
  6. make clean
  7. Compiled for ARMV7
  8. Compiled project from xCode for different different simulators and device
  9. Fail to compile xCode project.

Is there any way to compile for all architecture ? Please help me out for this problem.

saravnandm commented 8 years ago

To solve this issue, just turn off the ONLY_ACTIVE_ARCH flag. Open the Build Settings->Build Active Architecutre Only flag-> from YES to NO.

meghaParmar commented 8 years ago

@saravanandm Yes I tried using above solution but still it gives problem in compilation. Should I try with same project of pjsua? or copy all compiled library files in another project?

meghaParmar commented 8 years ago

Hello, i found one another thing here, When I set "Architecture" as $(ARCHS_STANDARD_32_BIT) inside "Build Settings", It is able to build for every architecture. I am not getting what may be the issue here. Any idea to build with default architecture?

saravnandm commented 8 years ago

You have to only drag and drop g729 lib to pjsua project, all other libraries are included by default.

ismaiI1 commented 8 years ago

@saravanandm , i used this library. it's perfect. thank you 👍 :)