- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Unsatisfied symbol error in aCC link with mixe...
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
11-19-2001 01:25 PM
11-19-2001 01:25 PM
Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
I have a project which contains a few C code and ONE C++ program which calls functions defined in the C code. I used aCC to cimpile all these code and ar a library libl1.a. I have other code (C++ code) for this project and when I linked this library, I got some unsatisfied symbol in the object file of that C++ in libl1.a. I DID remember to use
ifdef __cplusplus
extern "C" {
...
in the header file for that C++ file.
I used aCC to compile both C and C++ code.
All the code compiles and links fine on other platforms using g++.
Any hint? Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 01:40 PM
11-19-2001 01:40 PM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 01:48 PM
11-19-2001 01:48 PM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
I doubt some options for aCC were not set right. The option I use is
aCC -z +DA2.0W +DO11.0
Any advice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2001 05:30 AM
11-20-2001 05:30 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
Cheers,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2001 08:26 AM
11-20-2001 08:26 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2001 08:49 AM
11-20-2001 08:49 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
Therefore you aren't really mixing C with C++ at all, everything is being compiled as C++.
If you remove the extern "C" declarations all should work.
Cheers,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2001 09:25 AM
11-20-2001 09:25 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
Is there a way to generate a library of the mix of the C and C++ code and link with other part of the program to get a 64 bit executable on HP? I heard there are some gcc for 64 bit, but I can't find on our system.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 01:45 AM
11-21-2001 01:45 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
Try using nm++ to dump the names of the symbols in each of your object files and look for where the duplicates are.
As for extern C, definitely leave those declarations out. The only reason to use them is if you have code compiled with a C compiler that you need to link with. This is because the C and C++ compilers have different methods of generating symbol names. Since you're using the aCC C++ compiler to compile all the code you don't need them because all your symbol names will be generated in the C++ method. In fact using them will result in unsatisfied symbols.
If you can provide a small example I may be able to help further. I can't explain without more information why it would work on other platforms and not with aCC.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 10:05 AM
11-21-2001 10:05 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
Is there any other compiler for me to compile C code for HP 64 bit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2001 06:14 AM
11-22-2001 06:14 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2001 11:27 AM
11-22-2001 11:27 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
What is the HP ACSI C compiler? What's the program name?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2001 02:11 AM
11-27-2001 02:11 AM
Re: Unsatisfied symbol error in aCC link with mixed C and C++ for 64 bit
$ cc -Ae
If it comes back saying that the -Ae option is only available with the ANSI C product, then you don't have it.
I think you can purchase it online from software.hp.com - just look for the C / ANSI C Developers bundle, product id B3901BA.
I've also found from another thread that HP have a freely available version of gcc that will compile 64bit apps. Take a look at:
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html
Cheers,
Steve