This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

gcc and g++ live555 RTP stack

Other Parts Discussed in Thread: TVP5158

Dear All,

    I build the live555 library in order to have the RTP stack on the DM365. Now, the library calls are in C++ so I have to build some file with g++ (arm_v5le_g++,  montavista kernel). The major part of the code is build in gcc and it is not so easy to build all with g++ (including the mcvip framework for the TVP5158). If I try to link objects which have been built with gcc and objects build in g++ the linker does not finds the symbols.

Is there a way to link these objects together? I think I have to modify the calling conventions but I don't know how.

Thank you.

  • I answer to myself.

    I found a good explanation about how to mix C and C++ here: http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html

    In my case I only had to compile the file with the "main" i.e. main.c with the g++ and declare the include files which contains the prototypes of the functions compiled in c (in main.c) in this way:

    extern "C"

    {

    #include "video.h"

    #include "writer.h"

    ...

    }

  • Hi Peregrinus,

    Did your problem get solved? I am also porting Live555 stack on DM8168 board.  I have the same problem. Not able to link the library.

    Please reply in this regards

    Komal Kumar

     

  • Komal, 

        yes I can link the library usign g++ instead of gcc for the "main" end for the files which use the live555. 

    Moreover you have to include in your "main" file the prototypes of the file compiled with gcc in the following way. 

     

     

    extern "C"

    {

    #include "video.h"

    #include "writer.h"

    ...

    }

     

    This allows to me to link the library in my application building with the live555lib. However I have not used the library yet.

    Another way should be to build all your application with g++. Maybe you have to work a while in your code because g++ is more accurate with the data types.

    Hope this help.

     

  • Hi Komal

     

    Did you make the live555 and the codes in EZSDK of DM8168 work together successfully?

    I tried to stream the video with the help of live555 lib, but stuck on the very beginning.

    It would be highly appreciated if you can share some knowledge about this.

     

    Thanks,

     

    Jun

  • I work with the DM365. I made this several month ago, however after you cross-compiled the library, you can use it as described in the examples. I suggest you to follow the live555 site and the live555 forum to get some help about it.

  • Thank  you  Peregrinus,

    By modifying the makefile, I have successfully cross-compiled it, although still not know how to stream the video with live555.

     

    BR,

    Jun

     

  • Hi Zhang,

    Were you able to get live555 encoding and streaming across the network? I am also looking for a jumping off point if you could help me get started....

    Thanks

    Tim