LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-29-2007, 04:38 AM   #1
YuriyRusinov
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
QT 4 include files produce compiler errors in wrappers on C


Hello !

I develop wrappers in C for C++ library, which was make with QT class library. Which way I have to include header files from QT into my .c file
e.g.
Code:
search.c

#include <QObject>
If I try to make project using qmake utility and in pro file write
Code:
QT += core
then I receive many error messages such this
Quote:
gcc -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/opt/xgis/include/xgis -I/opt/gdal/include -I. -I. -o search.o search.c
In file included from /usr/include/qt4/QtCore/qobjectdefs.h:42,
from /usr/include/qt4/QtCore/qobject.h:44,
from /usr/include/qt4/QtCore/QObject:1,
from /opt/xgis/include/xgis/searchengine.h:9,
from search.c:1:
/usr/include/qt4/QtCore/qnamespace.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘QT_MODULE’
/usr/include/qt4/QtCore/qnamespace.h:1424: error: expected ‘)’ before ‘:’ token
/usr/include/qt4/QtCore/qnamespace.h:1440: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Q_CORE_EXPORT’
Thanks in advance,
Yuriy Rusinov.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I produce sorted list of files in current directory over a certain size? bangback Linux - Newbie 3 10-25-2006 12:11 AM
produce real media files, but not from raw mowne Linux - Software 0 05-19-2006 06:29 AM
Running a program inside my QT application does not produce needed output files??? keos Programming 0 02-22-2004 11:37 PM
How to produce rpm files? SML Linux - Newbie 2 12-09-2002 08:14 AM
How to produce RPM files? linuxlah Linux - General 2 07-02-2002 12:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration