ok..l'idea precedente si è rivelata malsana e deve essere scartata in quanto nascono nuovi e complessi problemi in fase di compilazione delle classi native del DBMS.. ho letto che specificando una funzione c++ come extern "c" ,definendo un header condiviso tra i programmi c e c++ in cui si specifica e della funzione è possibile invocare dca c la suddetta funzione... quello che mi chiedo è se i due programmai debbano essere compilati separatamente.... di seguito un estratto dell'articolo a cui faccio riferimento...
Help
/*******
Accessing C++ Code From Within C Source
If you declare a C++ function to have C linkage, it can be called from a function compiled by the C compiler. A function declared to have C linkage can use all the features of C++, but its parameters and return type must be accessible from C if you want to call it from C code. For example, if a function is declared to take a reference to an IOstream class as a parameter, there is no (portable) way to explain the parameter type to a C compiler. The C language does not have references or templates or classes with C++ features.
Here is an example of a C++ function with C linkage:
#include <iostream>
extern "C" int print(int i, double d)
{
std::cout << "i = " << i << ", d = " << d;
}
You can declare function print in a header file that is shared by C and C++ code:
#ifdef __cplusplus
extern "C"
#endif
int print(int i, double d);
/*******