?
Solved

env_rdbms.mk producing main conflict with libnzjs8.a

Posted on 2001-07-31
8
Medium Priority
?
269 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
LVL 22

Accepted Solution

by:
nietod earned 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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 …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

807 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