Hello all.
I am having trouble with my compiler.
Its not including a couple of header files which I KNOW is there. Its saying they don't exist.
(Elaborated more on it below the compiler output)
Here's the compiler output:
Running build steps for project TextToSpeechDialog5...
Starting: E:/Qt/2009.03/qt/bin/qmake.exe E:/Documents and Settings/Gorilla/My Documents/Programming_Projects/EasySSL/Modules/MainWindow_mod/Modules/TTS_mod/modules/TextToSpeechDialog5/TextToSpeechDialog5.pro -spec win32-g++ -r
Exited with code 0.
Starting: E:/Qt/2009.03/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `E:/Documents and Settings/Gorilla/My Documents/Programming_Projects/EasySSL/Modules/MainWindow_mod/Modules/TTS_mod/modules/TextToSpeechDialog5'
E:/Qt/2009.03/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `E:/Documents and Settings/Gorilla/My Documents/Programming_Projects/EasySSL/Modules/MainWindow_mod/Modules/TTS_mod/modules/TextToSpeechDialog5'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"e:\Qt\2009.03\qt\include\QtCore" -I"e:\Qt\2009.03\qt\include\QtGui" -I"e:\Qt\2009.03\qt\include" -I"e:\Qt\2009.03\qt\include\ActiveQt" -I"debug" -I"e:\Qt\2009.03\qt\mkspecs\win32-g++" -o debug\TextToSpeechDialog5.o TextToSpeechDialog5.cpp
In file included from module/CtextToSpeechDialog5/CtextToSpeechDialog5.h:7,
from TextToSpeechDialog5.h:4,
from TextToSpeechDialog5.cpp:5:
module/CtextToSpeechDialog5/../../../TextToSpeechDialogSuccess/TextToSpeechDialogSuccess.h:4:74: module/CtextToSpeechDialogSuccess/CtextToSpeechDialogSuccess.h: No such file or directory
In file included from module/CtextToSpeechDialog5/CtextToSpeechDialog5.h:8,
from TextToSpeechDialog5.h:4,
from TextToSpeechDialog5.cpp:5:
module/CtextToSpeechDialog5/../../../TextToSpeechDialogFailure/TextToSpeechDialogFailure.h:4:74: module/CtextToSpeechDialogFailure/CtextToSpeechDialogFailure.h: No such file or directory
In file included from TextToSpeechDialog5.h:4,
from TextToSpeechDialog5.cpp:5:
module/CtextToSpeechDialog5/CtextToSpeechDialog5.h:48: error: ISO C++ forbids declaration of `CtextToSpeechDialogSuccess' with no type
module/CtextToSpeechDialog5/CtextToSpeechDialog5.h:48: error: expected `;' before '*' token
module/CtextToSpeechDialog5/CtextToSpeechDialog5.h:49: error: ISO C++ forbids declaration of `CtextToSpeechDialogFailure' with no type
module/CtextToSpeechDialog5/CtextToSpeechDialog5.h:49: error: expected `;' before '*' token
mingw32-make[1]: Leaving directory `E:/Documents and Settings/Gorilla/My Documents/Programming_Projects/EasySSL/Modules/MainWindow_mod/Modules/TTS_mod/modules/TextToSpeechDialog5'
mingw32-make: Leaving directory `E:/Documents and Settings/Gorilla/My Documents/Programming_Projects/EasySSL/Modules/MainWindow_mod/Modules/TTS_mod/modules/TextToSpeechDialog5'
mingw32-make[1]: *** [debug/TextToSpeechDialog5.o] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project TextToSpeechDialog5
When executing build step 'Make'
The problem stems from the include lines in header files “TextToSpeechDialogSuccess.h” and “TextToSpeechDialogFailure.h”.
These lines are as follows:
For TextToSpeechDialogSuccess.h:
Code:
#include “module/CtextToSpeechDialogSuccess/CtextToSpeechDialogSuccess.h”
For TextToSpeechDialogFailure.h:
Code:
#include “module/CtextToSpeechDialogFailure/CtextToSpeechDialogFailure.h”
The compiler claims these files don't exist at those locations, when in truth of fact, they do. I know, because I have successfully built the executables for both of those dialogs, using their own project files, which use those same headers successfully.
The directory structure for the TextToSpeechDialogSuccess module is as follows (note that dirs are in bold):
TextToSpeechDialogSuccess:
TextToSpeechDialogSuccess.h (includes “CtextToSpeechDialogSuccess.h”)
TextToSpeechDialogSuccess.cpp (includes “TextToSpeechDialogSuccess.h” and provides the int main() function for the module)
module:
CtextToSpeechDialogSuccess:
CtextToSpeechDialogSuccess.h (has class definition of class CtextToSpeechDialogSuccess)
CtextToSpeechDialogSuccess.cpp (includes “CtextToSpeechDialogSuccess.h” and provides the definitions for all class methods)
Similarly, the directory structure for the TextToSpeechDialogFailure module is as follows (note that dirs are in bold):
TextToSpeechDialogFailure:
TextToSpeechDialogFailure.h (includes “CtextToSpeechDialogFailure.h”)
TextToSpeechDialogFailures.cpp (includes “TextToSpeechDialogFailure.h” and provides the int main() function for the module)
module:
CtextToSpeechDialogFailure:
CtextToSpeechDialogFailure.h (has class definition of class CtextToSpeechDialogFailure)
CtextToSpeechDialogFailure.cpp (includes “CtextToSpeechDialogFailure.h” and provides the definitions for all class methods)
Now, the module "TextToSpeechDialog5" (the module I'm having trouble compiling) is located in the same directory as the other modules' directories are located in (i.e. a folder called “modules”), and the hierarchy structure is the same as the other two dialog modules. Only difference is, since this dialog needs to create and show the next dialog (the success or failure dialog, depending on the result of the conversion of text to speech), I had to include the other two dialog modules' headers (“TextToSpeechDialogSuccess.h” and “TextToSpeechDialogFailure.h”, which if you can remember, includes the header files of their module's class) in the header of the "TextToSpeechDialog5" module (named appropriately “TextToSpeechDialog5.h”).
To accomplish this, I used the following two lines in the header file:
Code:
#include “../../../TextToSpeechDialogSuccess/TextToSpeechDialogSuccess.h”
#include “../../../TextToSpeechDialogFailure/TextToSpeechDialogFailure.h”
The “../” notations simply mean to go up one directory from the current directory, so since I gave that three times, that means look for a directory called “TextToSpeechDialogSuccess” three directories up from the current directory (which is “CtextToSpeechDialog5”), enter it, and include the file located in it called “TextToSpeechDialogSuccess.h” (the second line is almost identical and include's the failure dialog module's header). That worked fine. The problem occurred when the compiler found the line:
Code:
#include “module/CtextToSpeechDialogSuccess/CtextToSpeechDialogSuccess.h”
inside the “TextToSpeechDialogSuccess.h” header file, and the line:
Code:
#include “module/CtextToSpeechDialogFailure/CtextToSpeechDialogFailure.h”
inside the "TextToSpeechDialogFailure.h" header file.
For some reason, the compiler is unable to include those files, and I don't know why, since they DO exist at that exact same location, because, like I already mentioned, I have already built the “TextToSpeechDialogSuccess” and “TextToSpeechDialogFailure” modules which use those same headers, and they compiled successfully.?? The only thing I can think of is the reason why its doing this is because the compiler can't handle the multiple directory changes for some reason, and so its throwing an error message saying it can't find the files.
Anyway, I hope someone can come up with a solution for this, because I almost have the GUI for my TTS_mod working, with all dialogs already coded and ready to be compiled, but for some reason the compiler is giving me problems and preventing me from completing it.
Thanks, and looking forward to a reply.