Re: pjusa2 - unable to define stunserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!
 
This code works for me:
 
                 EpConfig ep_cfg;
                 ep_cfg.uaConfig.stunServer.push_back("pjsip.org");
        ep->libInit(ep_cfg);
 
02.10.2016, 20:10, "Hermann Norpois" <hnorpois@xxxxxxxxx>:
Hello,

I am unable to define a stunserver. After running

make
cc -o myapp myapp.cpp `pkg-config --cflags --libs libpjproject`
myapp.cpp: In function 'int main()':
myapp.cpp:58:22: error: expected ';' before '{' token
     ua_cfg.stunServer{"pjsip.org"};
                      ^
make: *** [myapp] Error 1

This is my code:

 // Start the library (worker threads etc)
    try {
        ep.libStart();
    } catch(Error& err) {
      std::cout << "Startup error: " << err.info() << std::endl;
        }
// UaConfig
    UaConfig ua_cfg;
    ua_cfg.stunServer{"pjsip.org"};


ua_cfg.stunServer is defined as stringvector. Isnt this the correct syntax for stringvector according c++11 upwards?
This is my compiler:
lrwxrwxrwx 1 root root 16 Sep  3 19:22 /usr/bin/g++ -> /usr/bin/g++-4.9

Could anybody give me a hint?

Thanks
Hermann
 
,

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

 
 
--
С уважением,
Александр Анцев
 
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux