- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to compile multiple Pro*C programs in a C+...
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
тАО02-14-2006 06:57 PM
тАО02-14-2006 06:57 PM
How to compile multiple Pro*C programs in a C++ file
Actually I have created one Pro*C program compiled and executed.And I called this Pro*C program from one C++ program(Pro*c program as a method in C++ program).I have compiled C++ program as well as pro*C program and linked both programs.Its working fine.
I tried to call two Pro*C routines from C++ program.But I am getting the following errors.
ld:Duplicate Symbol "sqlca" in files test.o and test1.o
Here test1.o and test.o are object files for Pro*C programs.So give some information to solve this problem.
Thanks in Advance,
Ravi Kumar.T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2006 07:39 PM
тАО02-14-2006 07:39 PM
Re: How to compile multiple Pro*C programs in a C++ file
please have a look at:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=72147&admit=-682735245+1139992559275+28353475
The problem is that symbols are defined in two files and can not be removed. The files have to be relinked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2006 08:11 PM
тАО02-14-2006 08:11 PM
Re: How to compile multiple Pro*C programs in a C++ file
to summarize what I found out a long while back:
Amend LD_FLAGS to include
-Wl,-hsqlca,+allowdups
This may leave you with some warnings, but the code should run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 05:51 PM
тАО02-16-2006 05:51 PM
Re: How to compile multiple Pro*C programs in a C++ file
I tried the option +allowdups then also i am getting the same error and warning message.
I am working in HP-UX 11i and Oracle 10g.
I have included sqlca.h in both of Pro*c files.
I am getting the following error.
aCC: warning 901: unknown option: `+allowdups': use +help for online documentation.
ld: Duplicate symbol "sqlca" in files down.o and down1.o
1 errors.
Thanks,
Ravi Kumar.T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 09:43 PM
тАО02-16-2006 09:43 PM
Re: How to compile multiple Pro*C programs in a C++ file
for the +allowdups your compiler/linker has to be at a certain version.
Try without the allowdups, but with -Wl,-hsqlca
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 10:52 PM
тАО02-16-2006 10:52 PM
Re: How to compile multiple Pro*C programs in a C++ file
I have tried to link using -WL,-hsqlca,+allowdups.Its working but giving the following warning msg.
ld: Overriding sqlca(OBJECT) in file down.o with symbol sqlca(OBJECT) in file d
wn1.o
1 warnings.
But its generating exe file and its working fine.If u don't mine Pls can u explain what is the meaning of "duplicate symbol".
Thanks & Regards,
Ravi Kumar.T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 10:58 PM
тАО02-16-2006 10:58 PM
Re: How to compile multiple Pro*C programs in a C++ file
Take a look at this,
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,386,00.html
Workaround for duplicate symbol errors
http://h21007.www2.hp.com/dspp/ml/showArchiveMessage/1,,4!03!11!0054,00.html
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2006 11:21 PM
тАО02-16-2006 11:21 PM
Re: How to compile multiple Pro*C programs in a C++ file
the duplicate symbol message refers to information that appears more than once in the object code.
So you compile filea which pulls in some library code, which includes the label sqlca.
No problem.
You then compile fileb which pulls in some code which has the same label sqlca defined.
No problem.
But if you try to link the two object codes later, the linker says that there are two labels sqlca and it does not know which to use. The trick is to "optimise" the second label away when you link everything together.
Hope this explains it, at least to start.
http://forums1.itrc.hp.com/service/forums/helptips.do?#28