I'm trying to implement an external c++ header interface that will be produced as a shared library. Their example interface has c style functionality wrapped in extern "C" as they don't want name mangling to be performed.
My current implementation is qt dependent. Can I now place this qt code in the extern "C" and expect it to work out of the box? If this works why?
pseudo code: // don't expect this to work and might contain errors.
extern "C"{
void doStuff(){
QString filename="Data.txt";
QFile file( filename );
if ( file.open(QIODevice::ReadWrite) )
{
QTextStream stream( &file );
std::stringstream ss;
ss<<"something"<< endl;
}
}
}
Thanks!