I like to compile c code building a static library and then linking this
library from a c++ project.

But for all c-function calls I get undefined reference.

The static c-library is referenced by the c++ project in the .pro file:
LIBS += -lfoo


What goes wrong ?


The c files look like this:

int foo(int a)
{
  return(a);
}


and the header files:

#ifdef __cplusplus
extern "C" {
#endif

int foo(int a);

#ifdef  __cplusplus
} /* extern "C" */
#endif


and the project file parameters:

QT -= core gui 
TEMPLATE = lib
CONFIG += staticlib



_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to