Skip to content

How to deliver a software based on F´ to a customer to integrate it into his own software #1042

Answered by timcanham
ThibFrgsGmz asked this question in Q&A
Discussion options

You must be logged in to vote

It's hard to give a standard answer to these, since it's dependent on how the integrator wants it. They could request just libraries, or they may wish to recompile everything. Either way, they would need a C++ compiler to process any C -> C++ glue code. To get from C to C++, a common pattern I've used is something like this:

header file for C code:

somefile.h:

void some_bridge_function(int somearg);

some C++ glue code file:

somegluecode.cpp

// this forces C function symbols
extern "C" {
   void some_bridge_function(int somearg);
};

#include "somefile.h"

myClass class1;

void some_bridge_function(int somearg) {
   class1.doit(somearg);
}

From C:

someCfile.c

#include "somefile.h"

void do…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ThibFrgsGmz
Comment options

Comment options

You must be logged in to vote
1 reply
@ThibFrgsGmz
Comment options

Answer selected by ThibFrgsGmz
Comment options

You must be logged in to vote
1 reply
@ThibFrgsGmz
Comment options

Comment options

You must be logged in to vote
1 reply
@ThibFrgsGmz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants