Project

General

Profile

Feature #2795

using vici api(s) in the c++ application

Added by M Thotager 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
vici
Target version:
Start date:
Due date:
Estimated time:
Resolution:
Fixed

Description

Hi Team,

I'm using the vici interface in the c++ application and got the below linking errors as extern "c" linkage is missing in the libvici.h file.

: undefined reference to `vici_init()'
: undefined reference to `vici_connect(char*)'
: undefined reference to `vici_begin(char*)'
: undefined reference to `vici_add_key_valuef(vici_req_t*, char*, char*, ...)'
: undefined reference to `vici_add_key_valuef(vici_req_t*, char*, char*, ...)'
: undefined reference to `vici_add_key_value(vici_req_t*, char*, void*, int)'

Modified the headerfile to get it working locally, can these changes be made to branch ?

Thanks,
Mallesh

libvici.h.patch (501 Bytes) libvici.h.patch adding : extern "c" M Thotager, 11.10.2018 17:27

Associated revisions

Revision f18945df (diff)
Added by Tobias Brunner about 2 months ago

libvici: Wrap header in extern "C" to include it from C++

Fixes #2795.

History

#1 Updated by Tobias Brunner 2 months ago

  • Tracker changed from Issue to Feature
  • Status changed from New to Feedback
  • Target version set to 5.7.2
  • Affected version deleted (5.7.1)

Thanks for the patch, I've pushed it to the 2795-libvici-cpp branch. However, instead of using libvici, which might be problematic due to its GPLv2 license (unless you already have a commercial strongSwan license or create an open-source software), I'd recommend you have a look at the davici C library, which is licensed under the more permissive LGPLv2.1 license.

#2 Updated by M Thotager 2 months ago

Thanks Brunner for the input, I will explore the davici C library.

#3 Updated by Tobias Brunner about 2 months ago

  • Category set to vici
  • Status changed from Feedback to Closed
  • Assignee set to Tobias Brunner
  • Resolution set to Fixed

Also available in: Atom PDF