Hey guys,

i have this project that, when i compile, 11 of the header files cannot be opened. I have no clue why - i've never seen this type of error. The project is much to large to copy/paste here, but does anyone have an idea of what would cause this? They header files are not opened by anything else.

Are they in your include path?
On some platforms, the file names are case-sensitive. Do you have the capitalization and/or spelling correct?
Are the #includes in a conditional compilation block that isn't compiling under your current configuration?
Are they #included by a header that you have forgotten to #include in your main source file?

first , i think u gotto check whether these header files are present in the path u have set or not .
Well usually there would be an include folder in ur compiler directory , where u can find various header files .
Otherwise , if those are self made files , then i guess u gotto ensure they r in same directory .

Are they in your include path?
On some platforms, the file names are case-sensitive. Do you have the capitalization and/or spelling correct?
Are the #includes in a conditional compilation block that isn't compiling under your current configuration?
Are they #included by a header that you have forgotten to #include in your main source file?

Yes
Yes
No
No

:(

Your compiler may have a verbose option (i.e. some switch), which would enable you to see where it is actually looking for the include files.

My build log - not sure that this helps.

Build Log


Build started: Project: jaus_v2, Configuration: Debug|Win32

Command Lines


Creating temporary file "c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\jaus_v2\jaus_v2\Debug\RSP00000149084768.rsp" with contents
[
/Od /I "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\jaus_v2\jaus_v2\jr" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /c /ZI /TP ".\jr\src\XmlConfig.cpp"

".\jr\src\TCPConnection.cpp"

".\jr\examples\C++\sender.cpp"

".\jr\src\JuniorRTE.cpp"

".\jr\src\JuniorMgr.cpp"

".\jr\src\JuniorAPI.cpp"

".\jr\src\JUDPTransport.cpp"

".\jr\src\JTCPTransport.cpp"

".\jr\src\JSerial.cpp"

".\jr\src\JrSockets.cpp"

".\jr\src\JrLogger.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\jaus_v2\jaus_v2\Debug\RSP00000149084768.rsp" /nologo /errorReport:prompt"

Output Window


Compiling...
JrLogger.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\jrlogger.cpp(27) : fatal error C1083: Cannot open include file: 'JrLogger.h': No such file or directory
JrSockets.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\jrsockets.h(29) : fatal error C1083: Cannot open include file: 'Transport.h': No such file or directory
JSerial.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\jserial.h(29) : fatal error C1083: Cannot open include file: 'Transport.h': No such file or directory
JTCPTransport.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\jtcptransport.h(29) : fatal error C1083: Cannot open include file: 'Transport.h': No such file or directory
JUDPTransport.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\judptransport.h(29) : fatal error C1083: Cannot open include file: 'Transport.h': No such file or directory
JuniorAPI.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\juniorapi.cpp(26) : fatal error C1083: Cannot open include file: 'JuniorAPI.h': No such file or directory
JuniorMgr.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\juniormgr.h(26) : fatal error C1083: Cannot open include file: 'Transport.h': No such file or directory
JuniorRTE.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\xmlconfig.h(33) : fatal error C1083: Cannot open include file: 'ConfigData.h': No such file or directory
sender.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\examples\c++\sender.cpp(25) : fatal error C1083: Cannot open include file: 'JuniorAPI.h': No such file or directory
TCPConnection.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\tcpconnection.h(29) : fatal error C1083: Cannot open include file: 'Transport.h': No such file or directory
XmlConfig.cpp
c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\xmlconfig.h(33) : fatal error C1083: Cannot open include file: 'ConfigData.h': No such file or directory
Generating Code...

Results


Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\jaus_v2\jaus_v2\Debug\BuildLog.htm"
jaus_v2 - 11 error(s), 0 warning(s)

Mm, maybe try Process Monitor and capture the build process. You'll get to see in detail pretty much everything that VS is trying to do.

Based on your build log, there are only 4 headers that it can't find:
JrLogger.h
Transport.h
JuniorAPI.h
ConfigData.h

The errant files that reference them are found in a couple different directories. Have you properly specified the paths in your #include statements?

Which include path is correct for which file?

c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\src\

or

c:\documents and settings\administrator\my documents\visual studio 2008\projects\jaus_v2\jaus_v2\jr\examples\c++\

If neither, what are the actual paths? Make sure you have them correct in your #include statements.

Did you use angle brackets ( '<>' ) or double-quotes ( " " ) for the #include filenames? I'm not sure on the specifics, but I know that it changes the way the compiler looks for the #included files. Try changing the characters used.

Thanks for the advice - I'll try changing them from #include ".." to <...>. Also, I've setup a few different directories in my project properties include paths - I'm not including the path in my #include

e.g.

#include "JrLogger.h"

The quoted version is the broadest searching, that would be your better option. You might consider changing it to something more like this though.

#include "file-path/JrLogger.h"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.