Solved

env_rdbms.mk producing main conflict with libnzjs8.a

Posted on 2001-07-31
8
260 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

757 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

22 Experts available now in Live!

Get 1:1 Help Now