[Qt-interest] C code in QT use queue in Class

Mic J michael.cognacc at gmail.com
Tue Aug 4 19:31:53 CEST 2009


> You should be able to use any C code with C++ (nothing to do with Qt
> really).

Well the C code works flawlessly.
but when i try to use it with C++ (in a QT class)
It complains of multiple defined instances ot the variables.

if i look at it with nm compiled with C the global variables
are of type C for common varables.
When compiled in QTCreator (C++ compiler (G++)).
They are of type B "uninitialized" BSS section.
And then they clash.

i played around with extern i tried using this apporach.
http://www.learncpp.com/cpp-tutorial/42-global-variables/
Using header for extern vars (declaration) and cpp file for
definition. and a couple of other appraches. all this however
touches the C code. and i really don't want to mess with it.

Mic



More information about the Qt-interest-old mailing list