home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!newsgate.watson.ibm.com!yktnews2.watson.ibm.com!yktnews!admin!influenza!lucien
- From: lucien@watson.ibm.com (Lucien Van Elsen)
- Subject: Re: Shared Library for C++ Classes, How?
- Sender: news@watson.ibm.com (NNTP News Poster)
- Message-ID: <LUCIEN.93Jan21133018@fionavar.watson.ibm.com>
- In-Reply-To: dchen@vicstoy.UUCP's message of Thu, 21 Jan 1993 00:01:49 GMT
- Date: Thu, 21 Jan 1993 18:30:18 GMT
- Distribution: usa
- Disclaimer: This posting represents the poster's views, not necessarily those of IBM
- References: <1993Jan21.000149.25746@vicstoy.UUCP>
- Nntp-Posting-Host: fionavar.watson.ibm.com
- Organization: IBM T.J. Watson Research Center
- Lines: 31
-
- dchen@vicstoy.UUCP (Daixiang Chen) writes:
- > How to make the try.o a shared library? If the export file is need
- > (as needed for C functions) how to say
- > "export class example or export class::print" in export file format?
- >
- > We use XL C++ 1.0, run AIX 3.2.2, I don't have the C++ compiler's user
- guide.
-
- There is a "makeC++SharedLib" script in /usr/lpp/xlC/bin that you can use to
- do this. Before using it, you'll need to create a file that contains a list
- of all the symbols (member function names, data object names, etc.) that
- will be exported to the library using /usr/ucb/nm on the .o file. From this
- list, exclude all symbols that begin with a '.' and include all the virtual
- tables (symbols that start with __vft or __vtt) of type T, D, and B that may
- be used by your program. If the library references other shared libraries,
- you'll need to create an import file of symbols to be resolved by the
- binder.
- Then, use
- makeC++SharedLib -E export_list file.o file2.o
- to create the shr.o for the shared library.
-
- I'd suggest that you get the User's Guide, by the way- not only does it give
- detailed instructions and examples for doing this and other obscure and
- useful things, but it only costs $2.62 (according to my database; pub number
- SC09-1472-01). Definitely worth the price.
-
- -Lucien
- --
- -----------------------------------------------------------------------
- Lucien Van Elsen IBM Research
- lucien@watson.ibm.com Project Agora
-