Operating System - OpenVMS
1828349 Members
3054 Online
109976 Solutions
New Discussion

Re: C++ and XML compile problems - could not open source file

 
SOLVED
Go to solution
Steve Porter_2
Occasional Advisor

C++ and XML compile problems - could not open source file

I am developing an XML application written in C++. When I try to compile, I keep getting the following error:

set process/parse=extended/case_lookup=sensitive

CXX /INCLUDE_DIRECTORY=(SYS$LIBRARY:, SYS$DISK:[], XERCES-C$ROOT:[000000.SRC]) /

DEBUG/NOOPTIMIZE/assume=noheader/prefix_library=all/exception/template=local/WAR

NING=(DISABLE=(CASTQUALTYP,EXTRASEMI,LONGEXTERN,CODEUNREACHABLE,CODCAUUNR,INTSIG

NCHANGE,-

NOCORDEL,UNSCOMZER))/DEFINE=(DEBUG,_DEBUG,CIM_VMS,NDEBUG, __USE_STD_IOSTREAM=1,X

ERCES_TMPLSINC) TCPCEAPICPP.CPP



#include // Implementation defined limits

.........................................................^

%CXX-E-SRCFILNOOPEN, could not open source file "limits.h"

at line number 23 in module limits. of text library SYS$COMMON:[SYSLIB]CXXL$ANSI

_DEF.TLB;2


Thanks, Steve
17 REPLIES 17
Martin P.J. Zinser
Honored Contributor

Re: C++ and XML compile problems - could not open source file

For starters: Do you have limits.h? Can you check with

$ pipe lib/list sys$library:decc$rtldef.TLB | search sys$input limits

(limits.h should be part of the C headers if I am not confused)

Antoniov.
Honored Contributor

Re: C++ and XML compile problems - could not open source file

Hi Steve,
perhaps is same as
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5861c288900d194abffd6f0a5417c062,00.html

Bye
Antoniov
Antonio Maria Vigliotti
Brad McCusker
Respected Contributor

Re: C++ and XML compile problems - could not open source file

Why is it looking in SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;2 ? limits.h should be in DECC$CRTLDEF.TLB - so definitely verify that you have it in that library, and then, try to determine why it isn't looking in DECC$CRTLDEF.TLB?
Brad McCusker
Software Concepts International
Martin P.J. Zinser
Honored Contributor

Re: C++ and XML compile problems - could not open source file

Hello Brad,

there is also a limits C++ include. As it seems this does include the C header in turn (which sounds reasonable as the range of types should be the same in C and C++)

Greetings, Martin
Steve Porter_2
Occasional Advisor

Re: C++ and XML compile problems - could not open source file

Hi Everybody,

Thanks for your replies. I had looked at the /include problem thread, but looked at it again just in case. When I checked the system library as Martin suggested, there is an entry for limits.

After some more experimenting, here is what I think the problem is. I made a c++ file that essentially only has #includes for , , and (since I am also getting an error on that one). This compiles fine to begin with. But when I set proc/parse=extended, I get this same error. The switch /case_lookup=sensitive does not seem to have any effect on this. However, if I do not have those characteristics set for the process, the compiler cannot find the XML header files.

So this leads me to wonder if there is a problem with having both the XML and the standard header files included in the same module. But the samples that are included with the XML kit build fine, and they include some of the standard headers. The XML kit is where I got all those switches for the compile, as well as the set process command.

Steve
Martin P.J. Zinser
Honored Contributor

Re: C++ and XML compile problems - could not open source file

Hello Steve,

can you post your boiled-down example so we have something to experiment with?

Greetings, Martin
Steve Porter_2
Occasional Advisor

Re: C++ and XML compile problems - could not open source file

Sure. Here is the cxx file. The includes are the ones I was getting an error on; I do not include them directly in my files.

#include
#include
#include
main(){}


I have attached (or attempted to) a .com file I made to compile with the switches that are used by the XML sample programs. Toggle between the first two lines to see the different behavior.

Thanks, Steve

Martin P.J. Zinser
Honored Contributor

Re: C++ and XML compile problems - could not open source file

Hello Steve,

since you do have /case_lookup I assume you are at OpenVMS 7.3-1. The system I can test with right now is a 7.3. Set proc/parse=extended does compile your example fine. Do you really need the case sensitivity or is /case=blind an option? If you do need the cass sensitivity, how is your system disk formatted ODS-2 or ODS-5?

Greetings, Martin
Martin P.J. Zinser
Honored Contributor

Re: C++ and XML compile problems - could not open source file

Hello Steve,

confirmed on 7.3-1 that /case=blind cures the
problem. If you need casesensitive you might need to extract the headers from the TLB and make sure they are found in all lower case on the disk (i.e. you need an ODS-5 Volume)

Greetings, Martin
Steve Porter_2
Occasional Advisor

Re: C++ and XML compile problems - could not open source file

Hi Martin,

Yes, I do have V7.3-1. However, when we upgraded, there was no apparent need for any ODS-5 enabled drives. The HP XML kit requires ODS-5 (among other things), so I modified only the drive where I located the XML kit. So it seems what you are saying is that at least the system drive should be ODS-5 enabled, if not all the drives. Is that true?

Steve
Martin P.J. Zinser
Honored Contributor

Re: C++ and XML compile problems - could not open source file

Hello Steve,

no, just having the system disk on ODS-5 is not the solution (my test system at home has this and I get the same error).

Can you try to have a

#include and see if this is found?

Greetings, Martin
Steve Porter_2
Occasional Advisor

Re: C++ and XML compile problems - could not open source file

Nope, that did not do it.

Steve
Steve Porter_2
Occasional Advisor

Re: C++ and XML compile problems - could not open source file

So I have good news and bad news. I modified the XML build script to print out the process characteristics right before the compile, and someplace buried in there it changes the process to /case_lookup=blind. So the good news is that this change allows almost everything to compile, with the exception of the files that include the XML headers. Now I get

#include

..............................^

%CXX-E-SRCFILNOOPEN, could not open source file "xercesc/dom/DOM.hpp"

at line number 44 in file NGV03:[PORTER.TCP_CE_API.TCPCEAPICXX]TcpXML.HPP;2


The compile switches are the same as before.

Thanks, Steve
Martin P.J. Zinser
Honored Contributor
Solution

Re: C++ and XML compile problems - could not open source file

Do you have a logical xercesc? If yes how is it defined? What does dir xercesc:[dom]dom.hxx result in? The logical needs to be rooted to work.
Steve Porter_2
Occasional Advisor

Re: C++ and XML compile problems - could not open source file

There is a rooted logical xerces-c$root that is created by the XML kit, but not for xercesc. When I created it, the files I compiled manually work fine. However, my mms script still does not.

A question I still have though is how does the XML build script work. That does not define any logical (rooted or non-rooted) for xercesc. The only thing I can see is that when I do a sho proc/all in the middle of the script, the value for Default file spec is defined to be the same directory where I defined the xercesc root to be. Can you explain to me why?

Thanks, Steve
Steve Porter_2
Occasional Advisor

Re: C++ and XML compile problems - could not open source file

I modified my mms script to define the xercesc rooted logical for the job (define/job).

Thanks for all your help.

Steve
BGubenko
New Member

Re: C++ and XML compile problems - could not open source file

Apparently, /case_lookup=sensitive breaks processing of CRTL header files
in DECC$RTLDEF.TLB, at least angle bracketed form of inclusion, for both
C and C++. I'll post it in turris::cxxc_bugs notes file to make sure, that
this is either fixed or documented as a restriction.

Boris

x.c
---
#include

ALTOS::_1> cc/ver
Compaq C V6.5-001 on OpenVMS Alpha V7.3-1
ALTOS::_1> cxx/ver
Compaq C++ V6.5-004 for OpenVMS Alpha V7.3-1
ALTOS::_1>

ALTOS::_1> set process/parse=traditional

ALTOS::_1> set process/case_lookup=blind
ALTOS::_1> cc/noobj x.c
ALTOS::_1> cxx/noobj x.c
ALTOS::_1>

ALTOS::_1> set process/case_lookup=sensitive
ALTOS::_1> cc/noobj x.c

#include
.^
%CC-F-NOINCLFILEF, Cannot find file specified in #include directive.

ALTOS::_1> cxx/noobj x.c

#include
...................^
%CXX-E-SRCFILNOOPEN, could not open source file "limits.h"
ALTOS::_1>