Compiling c but not c++ on HPUXv11 (resource.h)

Marcel Moolenaar marcel@cup.hp.com
Wed Aug 17 16:23:00 GMT 2005


On Aug 17, 2005, at 1:50 AM, François HILLION wrote:

> Hi,
>
> I am using gcc 3.4.3 on a HP c3750 workstation (UX v11). Compiling  
> c works but not c++. Here is a "Hello world" exemple (demo.cpp)
> #include <stdio.h>
> //#include <iostream>
> using namespace std;
> int main(int argc, char *argv[]){ printf("Hello world !\n"); return  
> -1; }
>
> Compiling (gcc -o demo demo.cpp) gives :
> /usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (/var/ 
> tmp//ccKBZK7d.o) was detected. The linked output may not run on a  
> PA 1.x system.
> but at least the binary is here

The warning only tells you that the program may possibly not run on a
PA-RISC1.1 machine. It's harmless, though rather annoying, if you don't
have to worry about PA-RISC1.1. The compile and link did succeed and
you should be able to run your program normally.

*snip*
> Compiling (gcc -o demo demo.cpp) gives :
*snip*
> /usr/local/include/c++/3.4.3/cwctype:52:20: wctype.h: No such file  
> or directory
*snip*

> As for wctype.h, it seems that it does not exist under HPUXv11.00,  
> but wchar.h does.

The problem with GCC "fixing" up includes is that it creates a stronger
than necessary dependency on the version of the OS. Since GCC was
configured for HP-UX 11.11, I presume that it was also built on HP-UX
11.11 and thus that the "fixed" headers it includes are those belonging
to HP-UX 11.11. Installing this compiler on HP-UX 11.00 is not without
its challenges, if it is possible at all...

I fear there's no easy solution. If you're up to it, I would suggest
building GCC on your machine so that the headers match.

Hope this helps,

-- 
  Marcel Moolenaar                                marcel@cup.hp.com





More information about the Gcc-help mailing list