Hello. I work with writing Exif data into images, for this I installed the ImageMagick library. In the project file I registered the paths to the library and the header. I prescribe the necessary include and get the error message: c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\..\..\..\..\include\math.h:638: ошибка: expected ')' before '(' token .

In math.h , line 638 says: extern double __cdecl nearbyint ( double); . It seems that everything is as it should be and there should be no problems. Tell me, what could be the problem?

Wednesday QtCreator 1.2.1, Qt 4.8, MinGW, Win7 32 bit.

Do not pass by, please, my coursework has not been moving for 3 weeks.

Added.

Place where I include the heading:

 #include <QList> #include <Magick++.h> using namespace Magick; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {...} 

Place that swears in math.h:

 /* 7.12.9.2 Double in C89 */ extern float __cdecl floorf (float); extern long double __cdecl floorl (long double); /* 7.12.9.3 */ extern double __cdecl nearbyint ( double); extern float __cdecl nearbyintf (float); extern long double __cdecl nearbyintl (long double); /* 7.12.9.4 */ /* round, using fpu control word settings */ extern double __cdecl rint (double); extern float __cdecl rintf (float); extern long double __cdecl rintl (long double); 

Or even so. I create empty Qt the project. In the pro-file I write the paths to the libs. In main, here's what:

 #include <QtGui/QApplication> #include "qmlapplicationviewer.h" #include <Magick++.h> Q_DECL_EXPORT int main(int argc, char *argv[]) { QScopedPointer<QApplication> app(createApplication(argc, argv)); QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); viewer.setMainQmlFile(QLatin1String("qml/qttes/main.qml")); viewer.showExpanded(); return app->exec(); } 
  • Is your program code OK? - PaulD
  • And the code snippet can be seen? To the situation repeated ... - alexlz
  • @shchitov i686-w64-mingw32-g ++ (GCC) 4.6.3. The compilation went well, I did not specify it, respectively, the build did not pass / usr / bin / i686-w64-mingw32-g ++ mag.c ++ -I / usr / include / qt4 include / ImageMagick -I / usr / share / qtcreator / templates / qtquickapp / qmlapplicationviewer In general, the impression is that someone from the .h file indulges in macro-permutations. Only preprocessing (the -E key) and a bunch of text-result can be set to try to find this line from math.h ... - alexlz
  • Try to do the macroprocessor after all, and then translate the resulting code (to make it easier to search for a line with an error). - alexlz 4:21 pm
  • Well, why is it up to the pen? Possible reasons: version g ++, which does not support any extensions (although 4.4.0 is hmm), a curve .h file from the mingw kit ... - alexlz

0