HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Error while using C linker
Operating System - HP-UX
1825799
Members
2248
Online
109687
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
02-20-2004 12:52 AM
02-20-2004 12:52 AM
Error while using C linker
Hello All,
I have a library 'A' written in C. This library has dependency on another library 'B' written in C++ and exposes some APIs which 'A' library uses. Now the problem is if I use the C++ linker, thinks work fine. But if I use C linker, then I get the following error,
ld: Unsatisfied symbol "main" in file
1 errors.
I am using HP-11.00 RISC with aCC 3.37 compiler. Is there any linker flag that I should you use? Any workaround? My requirement is basically to use the C linker and not C++.
Any help is appreciated. Thanks in advance.
Sujata.
I have a library 'A' written in C. This library has dependency on another library 'B' written in C++ and exposes some APIs which 'A' library uses. Now the problem is if I use the C++ linker, thinks work fine. But if I use C linker, then I get the following error,
ld: Unsatisfied symbol "main" in file
1 errors.
I am using HP-11.00 RISC with aCC 3.37 compiler. Is there any linker flag that I should you use? Any workaround? My requirement is basically to use the C linker and not C++.
Any help is appreciated. Thanks in advance.
Sujata.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2004 01:34 AM
02-20-2004 01:34 AM
Re: Error while using C linker
Hi
Seems like it is a 64 bit application . try removing the main
I seem to recall _main() should not be called for 64bit apps.
Steve Steel
Seems like it is a 64 bit application . try removing the main
I seem to recall _main() should not be called for 64bit apps.
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2004 01:45 AM
02-20-2004 01:45 AM
Re: Error while using C linker
Hi Steve,
Thanks for the response.
I am compiling code for 32-bit as well as 64-bit. Mine is a shared library. I am not calling main from anywhere.
Sujata.
Thanks for the response.
I am compiling code for 32-bit as well as 64-bit. Mine is a shared library. I am not calling main from anywhere.
Sujata.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2004 04:51 PM
02-22-2004 04:51 PM
Re: Error while using C linker
there is no separate linker for c++ on hpux.
if you want to build shared libraries from c++ code, you have to use the -b option of aCC. do not link it directly with ld.
as for the C compiler, you should make sure you use the ansi C compiler and not the bundled C compiler (which is there only to rebuild kernels).
the recent versions of ansi c compiler /opt/ansic/bin/cc also support the -b option. i dont think the bundled compiler does that.
if this does not work, please run the link again with LDOPTS set to -v (or -Wl,-v in the compiler command line) and post the output., along with the what string of the linker (output of "what /usr/ccs/bin/ld").
--
ranga
[i work for hpe]
if you want to build shared libraries from c++ code, you have to use the -b option of aCC. do not link it directly with ld.
as for the C compiler, you should make sure you use the ansi C compiler and not the bundled C compiler (which is there only to rebuild kernels).
the recent versions of ansi c compiler /opt/ansic/bin/cc also support the -b option. i dont think the bundled compiler does that.
if this does not work, please run the link again with LDOPTS set to -v (or -Wl,-v in the compiler command line) and post the output., along with the what string of the linker (output of "what /usr/ccs/bin/ld").
--
ranga
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP