Solved

env_rdbms.mk producing main conflict with libnzjs8.a

Posted on 2001-07-31
8
262 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
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…
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…

770 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