?
Solved

env_rdbms.mk producing main conflict with libnzjs8.a

Posted on 2001-07-31
8
Medium Priority
?
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

777 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