bendahl
asked on
env_rdbms.mk producing main conflict with libnzjs8.a
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
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
If you can, post your main() code here also.
>> 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.
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.
ASKER
The exact error message is:
ld: fatal: symbol `main' is multiply defined:
(file /export/home/oracle/produc t/8.1.6/li b/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/
ld: fatal: symbol `main' is multiply defined:
(file /export/home/oracle/produc
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/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>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?
Can you post the first three lines of code from your main?
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: https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
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: https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
After review, the proposed answer will be accepted by:
ComTech
Community Support Admin
ComTech
Community Support Admin
Please post the exact error.
Copy and paste the error you get into a comment here.