[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build problems for ddd-3.3 on AIX and HP-UX
From: |
Tim Mooney |
Subject: |
Re: Build problems for ddd-3.3 on AIX and HP-UX |
Date: |
Sun, 18 Mar 2001 15:55:18 -0600 (CST) |
In regard to: Build problems for ddd-3.3 on AIX and HP-UX, Freddy Jensen...:
>/bin/sh ./libtool --mode=link
>/user/unibat/gnutools/aix/gcc_2.95/aix_4.3/bin/c++ -DNDEBUG -O2 -g -W -Wall
>-trigraphs -o userinfo userinfo.o
>mkdir .libs
>/user/unibat/gnutools/aix/gcc_2.95/aix_4.3/bin/c++ -DNDEBUG -O2 -g -W -Wall
>-trigraphs -o userinfo userinfo.o
>ld: 0711-317 ERROR: Undefined symbol: .isspace(int)
>ld: 0711-317 ERROR: Undefined symbol: .tolower(int)
>ld: 0711-317 ERROR: Undefined symbol: .isdigit(int)
>ld: 0711-317 ERROR: Undefined symbol: .isascii(int)
>ld: 0711-317 ERROR: Undefined symbol: .isalpha(int)
>ld: 0711-317 ERROR: Undefined symbol: .toupper(int)
>For some reason the linker cannot find the library containing
>the isspace() function and its friends. I don't understand
>this. Isn't isspace() in libc.a?
Probably, run `nm' to find out for sure.
With C++, it's not as simple as having the symbol in a library you link with.
I'm *not* very C++ knowledgeable, so take this with a big grain of salt.
Hopefully someone else will chime in if I've made some horrible mistakes
on either of these:
1) The signature (I forget what C++ calls it) of the function must match
exactly -- function name, return type, and # and type of arguments must match
what's being called in the program.
2) Name mangling. C++ objects have their symbol names "mangled" by the
compiler/linker, so the complete prototype or object type can be encoded as
part of the name. Since plain old C functions shouldn't be mangled, they
need to be enclosed in a
extern "C" {
...
}
block when they're declared.
If I had to guess, I would guess that the gcc-specific header files,
probably installed somewhere under
/user/unibat/gnutools/aix/gcc_2.95/aix_4.3/lib/*/include
on your system, are missing the appropriately protected (i.e. with extern "C")
declarations for those header files. That's just a guess though, I could
be way off.
Run
find /user/unibat/gnutools/aix/gcc_2.95/aix_4.3 -name ctype.h -print
to see if there is a "fixed" version of ctype.h, and if so look to see if
those functions are declared, and if they're declared inside an extern "C"
block.
>checking for flex... no
>checking for lex... no
>../../src/ddd/configure[2114]: flex: not found.
>checking for flex... lex
You need either flex or lex installed. On my HP-UX 10.20 system lex is
installed as /opt/langtools/bin/lex, but there's a symlink in /usr/bin
so it's in the standard path if it's installed at all.
It appears to be part of the 'C-Dev-Tools.C-AUX' package. If you don't have
the C development stuff installed (the unbundled compilers and other stuff)
then you probably don't have access to it. Your best bet is to get and
install flex, from
ftp://ftp.gnu.org/non-gnu
Tim
--
Tim Mooney address@hidden
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164