Solved

env_rdbms.mk producing main conflict with libnzjs8.a

Posted on 2001-07-31
8
261 Views
Last Modified: 2008-02-01
I'm trying to compile on a Sun box an application that directly interfaces with the Oracle 8i RDBMS, and in the makefile for that application, I'm including $ORACLE_HOME/rdbms/lib/env_rdbms.mk  However, in $(TTLIBS) (a make variable env_rdbms.mk sets up) is a library include for libnzjs8.a, which I think is probably a necessary library.

For some reason beyond me, libnzjs8.a has a main in it, which is conflicting with my application's main.  When I go to the mk file and comment out the references to that library, I get linking errors from both oradb.o (the Oracle RDBMS API object file for the project, which compiled fine) and my main .o file, swmain.o.  Any idea how to overcome this?  The compile went fine with Oracle 7, but Oracle 8i's giving me trouble.

Language: C
OS: SunOS
0
Comment
Question by:bendahl
8 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 6339310
You should not be getting a main() function conflict.

Please post the exact error.
Copy and paste the error you get into a comment here.
0
 
LVL 30

Expert Comment

by:Axter
ID: 6339311
If you can, post your main() code here also.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6340115
>> For some reason beyond me, libnzjs8.a has a main in it
Are you sure?   That woudl be extremely stupid of the programmers that wrote it.  Unless they needed to have the entry point for some reason, and then provide soem mechnaism by which your code can get called.  If this is the case you should not have a main in your code.  However, that is probably not the case.  
0
 

Author Comment

by:bendahl
ID: 6343094
The exact error message is:
ld: fatal: symbol `main' is multiply defined:
        (file /export/home/oracle/product/8.1.6/lib/libnzjs8.anzjct.o) and file ../../lib/swmain.o);
ld: fatal: File processing errors. No output written to sqlweb
make: *** [sqlweb] Error 1

My main is too long to post into here, but if you'd like, you can get the SQLweb executable (the previous version of it) at http://www.SQLweb.com/
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 6344317
What docs do you have bout this oracle lib?   Maybe it is supposed to define main?   In that case it probably provide some mechanism for your code to get called.  
0
 
LVL 30

Expert Comment

by:Axter
ID: 6345530
>>My main is too long to post into here, but if you'd
Can you post the first three lines of code from your main?
0
 
LVL 11

Expert Comment

by:griessh
ID: 6842435
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "nietod" comment(s) as an answer. Unfortunatelly you never came back to answer Axter's question ...

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Expert Comment

by:ComTech
ID: 6858010
After review, the proposed answer will be accepted by:

ComTech
Community Support Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now