Hello, I've been pulling my hair out trying to figure out how to fix this. I don't have a lot of experience with OOP, so I'm at a bit of a dead end. I am using qt 4.3.3 with visual studio 2005 express.
I am getting an error:
The header file is this:------ Build started: Project: RoboSearch, Configuration: Debug Win32 ------
Performing Makefile project actions
mingw32-make -f Makefile.Debug
saveDOM.cpp:11:20: warning: extra tokens at end of #include directive
saveDOM.cpp:12:21: warning: extra tokens at end of #include directive
In file included from saveDOM.cpp:12:
saveDOM.h:20: error: expected class-name before '{' token
In file included from saveDOM.cpp:12:
saveDOM.h:31:7: warning: no newline at end of file
mingw32-make[1]: *** [debug/saveDOM.o] Error 1
mingw32-make[1]: Leaving directory `c:/Documents and Settings/abrounstein/My Documents/Visual Studio 2005/Projects/RoboSearch/RoboSearch'
mingw32-make: *** [debug] Error 2
Build log was saved at "file://c:\Documents and Settings\abrounstein\My Documents\Visual Studio 2005\Projects\RoboSearch\RoboSearch\Debug\BuildLog .htm"
RoboSearch - 1 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Qt Code:
#ifndef SAVEDOM_H #define SAVEDOM_H #include <Qt> #include <QtGui> #include <QLabel> #include "ui_saveDOM.h" #include "qdom.h" #include <QDomDocument> #include <QDir> { //line 22 ... }; #endifTo copy to clipboard, switch view to plain text mode
The .cpp file currently empty (although it wasn't at one point, it didn't change the errors)
What is strange is that I literally copied this from another header file in the same project which compiles and runs fine. When I take out the inheritence, I still seem to get the same problem. And yes, I am using the same compilier.
I originally posted this in a c++ forum, but I talked to someone I work with who is an experience programmer, but he said my code seemed sound to him. Is it maybe a qt problem?
Does anyone have any suggestions? Thanks!
Let me know if more information is needed.
Bookmarks