c++ftpp2pvoiplibjingle

how to compile pcp fileshare in libjingle


okay, i'm trying to compile the fileshare example called 'pcp' using the following command

 wolfgang@den-pc:~/tejesh/libjingle-0.6.14/programs$ g++ -g -Wall -DPOSIX
-DEXPAT_RELATIVE_PATH -DFEATURE_ENABLE_SSL -DHAVE_OPENSSL_SSL_H=1  -I ../ pcp_main.cc
 ../talk/build/dbg/lib/libxmpphelp.a ../talk/build/dbg/lib/libjingle.a ../talk/build
 /dbg/lib/libexpat.a ../talk/build/dbg/lib/libsrtp.a -lpthread -lssl

And i get the following 'typeinfo' error...

 pcp_main.cc: In member function ‘virtual void
 CustomXmppPump::OnStateChange(buzz::XmppEngine::State)’:
 pcp_main.cc:348:12: warning: enumeration value ‘STATE_NONE’ not handled in switch  
 [-Wswitch]
 /tmp/ccVe8JUg.o:(.rodata._ZTI14CustomXmppPump[typeinfo for CustomXmppPump]+0x18): 
 undefined reference to `typeinfo for XmppPump'
 /tmp/ccVe8JUg.o:(.rodata._ZTIN7cricket18SessionManagerTaskE[typeinfo for  
 cricket::SessionManagerTask]+0x8): undefined reference to `typeinfo for buzz::XmppTask'
 /tmp/ccVe8JUg.o:(.rodata._ZTIN7cricket15SessionSendTaskE[typeinfo for  
 cricket::SessionSendTask]+0x8): undefined reference to `typeinfo for buzz::XmppTask'
 /tmp/ccVe8JUg.o:(.rodata._ZTI17AutoPortAllocator[typeinfo for AutoPortAllocator]+0x8): 
 undefined reference to `typeinfo for cricket::HttpPortAllocator'
 collect2: ld returned 1 exit status

Anybody have some idea on this issue?


Solution

  • Did manage to compile pcp succesfully by scons,......... in your talk/ directory append the following line to 'libjingle.scons'

     talk.App(env, name = "pcp",
     posix_libs = [
       "crypto",
       "ssl",
     ],
     srcs = [
       "examples/pcp/pcp_main.cc",
     ],
    

    libs = [ "jingle", "expat", "srtp", "xmpphelp", ], )

    And then build it using instructions from the README of libjingle.. pcp binary will be built in your /talk/build/dbg/staging/ directory..