perchco / perchrtc

An iOS WebRTC demo using XirSys servers
MIT License
135 stars 34 forks source link

Linker error while using code in my own project. #6

Closed difujia closed 9 years ago

difujia commented 9 years ago

image

Hi,

Thank you for the contribution. This project helped a lot in solving my webrtc problem. Please see the picture above. I'm using the code in my own project, and the linker error suddenly occured. I'm sure I've added the webrtc compiled library in my library search path. I'm just wondering whether the project build setting was changed somewhere in order to build perch. Please help, thank you.

ceaglest commented 9 years ago

Hi Difujia,

Thanks for the feedback. Unfortunately, the PerchRTC classes are not setup to be easily used outside of the sample app yet (Would you be interested in this? See #7).

However, I'll see what I can do to help. The big issue when building PerchRTC in your own project is CaptureKit. Since we are subclassing C++ WebRTC classes within our project, the nighthawk-webrtc build includes their C++ capture headers. Besides the headers and defines (in nighthawk-webrtc) you also need to add the -fno-rtti compiler flag to PHVideoCaptureKit, and PHVideoCaptureBridge (see screenshot from the PerchRTC sample project).

perchrtc build settings

Hope this helps, Chris

difujia commented 9 years ago

Great, that works, thanks. I will look into wrapping this into a pod later.

ceaglest commented 9 years ago

No worries about the pod spec ticket, I self assigned it :) We are going to land a few more bug fixes and enhancements before dealing with class prefixes and packaging the code up for reuse.

Closing this issue.