- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /usr/ccs/bin Unresolved Symbol where symbol exists
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 06:27 AM
03-21-2006 06:27 AM
$ cc test.c -c
$ cc myroutine.c -c
$ cc myroutine.o test.o -o test1
No errors so far.
Now I put myroutine.o in an archive and try that.
$ ar -r libTEST.a myroutine.o
ar: creating libTEST.a
$ cc -L/appl/global/cmp/temp -lTEST test.c -o test2
/usr/ccs/bin/ld: Unsatisfied symbols:
myroutine (code)
The myroutine symbol is in the archive but ld doesn't find it.
This is a hello world level test program so there should not be complications like this.
$ nm libTEST.a
Symbols from libTEST.a[myroutine.o]:
Name Value Scope Type Subspace
M$8 |1073741824|static|data |$DATA
$myroutine | 0|extern|entry |$CODE$
printf | |undef |code |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 07:23 AM
03-21-2006 07:23 AM
SolutionBAD:
cc -L/appl/global/cmp/temp -lTEST test.c -o test2
GOOD:
cc -L/appl/global/cmp/temp test.c -lTEST -o test2
You also often have to order multiple libraries from the outermost (with respect to calls) to the innermost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 07:33 AM
03-21-2006 07:33 AM
Re: /usr/ccs/bin Unresolved Symbol where symbol exists
No to get all the C++ modules in the right order...
Thanks,
Ray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 10:29 AM
03-21-2006 10:29 AM
Re: /usr/ccs/bin Unresolved Symbol where symbol exists
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 11:59 PM
03-21-2006 11:59 PM
Re: /usr/ccs/bin Unresolved Symbol where symbol exists
Thanks again.