Chinmaya,

I don't think linking in vatplugin is a "supported" interface. Meaning it can 
change or go away at no notice.
If you build a C application you'd likely be happier with using VAPI.

Cheers,
Ole

> On 26 Jun 2020, at 13:58, Chinmaya Aggarwal <chinmaya.agar...@hsc.com> wrote:
> 
> Hi Dave,
> We have our application (using VPP C API) running outside of VPP.  We linked 
> vpp libs in our application (vatplugin, vppinfra, vlibmemoryclient, svm, 
> vppapiclient). Attaching file vpp_connect_test.c that creates connection with 
> VPP and calls VPP C API to modify a sr policy. We have used function S to 
> send the message and W to wait for its reply. On compiling this C file we are 
> getting the following error : -
> root@ggnlabvm-hnsnfvsdn03:~/vpp_api_test# make
> gcc  -Wall -g    -c -o vpp_connect_test.o vpp_connect_test.c
> gcc  -Wall -g  -I/usr/include/vpp_plugins -I/usr/include/ -o api_exec 
> vpp_connect_test.o -Wl,--start-group  -lvatplugin -lvppinfra 
> -lvlibmemoryclient -lsvm -lvppapiclient  -Wl,--end-group  -lpthread -lm -lrt 
> -ldl
> vpp_connect_test.o: In function `del_sl_pol2_index6':
> /root/vpp_api_test/vpp_connect_test.c:97: undefined reference to 
> `vat_time_now'
> /root/vpp_api_test/vpp_connect_test.c:97: undefined reference to `vat_suspend'
> /root/vpp_api_test/vpp_connect_test.c:97: undefined reference to 
> `vat_time_now'
> collect2: error: ld returned 1 exit status
> Makefile:35: recipe for target 'api_exec' failed
> make: *** [api_exec] Error 1
> 
> Is there any library that needs to be linked and we have missed it? If not, 
> can we use S and W function in an external C application, in a way similar to 
> how VPP uses it?
> 
> Thanks and Regards,
> Chinmaya Agarwal. 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16830): https://lists.fd.io/g/vpp-dev/message/16830
Mute This Topic: https://lists.fd.io/mt/75100285/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to