- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Compiling HP-UX 11.23
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 08:31 PM
03-21-2006 08:31 PM
If I compile and link the code without making use of an archive library step, it works.
As soon as I include the STL code within the archive or shared library, the link step fails.
Here is my .mk file:
#--------------------------------------------------------------
# HP-UX C++ compiler
#--------------------------------------------------------------
COMPILE=/opt/aCC/bin/aCC
CCFLAGS= -AA -c -v +p +DA2.0 +DS2.0 \
-D_HPUX_SOURCE \
-D_POSIX_C_SOURCE=199506L \
-DRWSTD_MULTI_THREAD \
-DRW_MULTI_THREAD \
-D_REENTRANT \
-D_THREAD_SAFE
#--------------------------------------------------------------
# HP-UX C++ linker
#--------------------------------------------------------------
LINK=ld
LDFLAGS= \
/opt/langtools/lib/crt0.o \
/opt/aCC/lib/cpprt0.o \
-L /opt/aCC/lib \
-v \
+vallcompatwarnings \
+pd 16M \
-lstd_v2 \
-lCsup_v2 \
-lm \
-L$(ORACLE_HOME)/lib32 \
-lclntsh
#--------------------------------------------------------------
# excutable
#--------------------------------------------------------------
exe: main.o failing.a
$(LINK) $(LDFLAGS) main.o -o tester.exe
main.o : main.cpp
$(COMPILE) $(CCFLAGS) main.cpp
failing.a : failing.cpp
$(COMPILE) $(CCFLAGS) failing.cpp
ar r failing.a failing.o
#--------------------------------------------------------------
Any ideas please?
Thanks
Carlo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 08:54 PM
03-21-2006 08:54 PM
Re: Compiling HP-UX 11.23
Generally you must NOT use ld to link aC++ applications. Use aCC instead.
You need to change your LDFLAGS to remove the default libs and then you need to add -AA. And change ld specific options to the -Wl form: -Wl,+pd,16M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 09:14 PM
03-21-2006 09:14 PM
Re: Compiling HP-UX 11.23
ld: Unsatisfied symbols:
fxFailingToLink__Fv (first referenced in main.o) (code)
*** Error exit code 1
Carlo
- Tags:
- unsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 11:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 04:51 PM
03-22-2006 04:51 PM
Re: Compiling HP-UX 11.23
I think the problem is with the creation of the archive file
"ar r failing.a failing.o"
If it is compiled with just the objects (failing.o) all is fine, but as soon as an archive is created, it is as if the archive file (failing.a) is not picked up?
Carlo
- Tags:
- archive lib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 04:59 PM
03-22-2006 04:59 PM
Re: Compiling HP-UX 11.23
Your comment got me on the right track...hence the points, thanks.
Carlo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 05:01 PM
03-22-2006 05:01 PM
Re: Compiling HP-UX 11.23
$(LINK) $(LDFLAGS) main.o -o tester.exe
did not include the .a as follows:
$(LINK) $(LDFLAGS) main.o failing.a -o tester.exe
Cheers
Carlo