- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: g++ with -static option can't compile
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
Discussions
Discussions
Forums
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
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
тАО08-22-2002 02:40 AM
тАО08-22-2002 02:40 AM
g++ with -static option can't compile
I want to compile my program and then run on another machine. So I need to use the "static" option and the command look like this:
% g++ -static -o test test.cpp
then it shows error as follows:
ld: Unsatified symbol "dlclose" in file /usr/lib/pa20_64/libc.a [setlocale.o]
ld: Unsatified symbol "dlsym" in file /usr/lib/pa20_64/libc.a [setlocale.o]
ld: Unsatified symbol "dlopen" in file /usr/lib/pa20_64/libc.a [setlocale.o]
Could anyone tell me what the problem is and how to solve this problem?
Any input is welcome and thanksful.
Andrew Lee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 02:49 AM
тАО08-22-2002 02:49 AM
Re: g++ with -static option can't compile
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 03:24 AM
тАО08-22-2002 03:24 AM
Re: g++ with -static option can't compile
test.cpp is very simple.
Only included iostream.h, stdlib.h, stdio.h
and with only one printf statement in the main function.
That's all.
Any idea?
Andrew Lee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 03:59 AM
тАО08-22-2002 03:59 AM
Re: g++ with -static option can't compile
Did you get the gcc from here
https://www.beepz.com/personal/merijn/#Gcc
??
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 04:22 AM
тАО08-22-2002 04:22 AM
Re: g++ with -static option can't compile
Hi,
I do not know g++ but I assume that -static
is the same as in HP-language would be
called archive (independant of shared libs)
The symbols you get unsatisfied are found
in libdld.sl.
The man-page for setlocale has a section
describing special considerations for linking
independant of shared libs.
See this section. It describes how
to link in libdld. You will there see what
has to be done when using cc. Try then to
find the appropriate otions for g++
Regards
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2002 06:21 AM
тАО08-22-2002 06:21 AM
Re: g++ with -static option can't compile
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html
The one I downloaded 3.0.2 64-bit binary (this version seems can't be download now)
Will it be different (apart from version) from that one on merjin's server?
I'd attached my test.cpp. Please tell me if you can compile it with -static or not. (P.S. it can be compiled without -static switch, but It can't be portable.)
Can anyone tell me how to use the "archive" switch in g++?
And how can I link with libdld.sl?
Thanks a lot!!
Andrew Lee