Operating System - OpenVMS
1752591 Members
2988 Online
108788 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