Re: ESQL/C Compiling Error
Posted in 1998
In article <75k2f9$km6$1@news-1.news.gte.net>, Troy Peterson <tp096255@gte.net> writes >I have written an ESQL/C program that consists solely of individual wrapper >functions to be used by both C and Fortran programs. In other words, it >doesn't have a <main> function. >I used to be able to compile this bit of code on its own so that the object >file could be compiled with whatever program required ESQL/C functionality, >that is until some 'untraceable' changes occured to the system. >I compile as follows: > "esql -o epsql epsql.ec" > Try esqlc -c epsql.ec instead.. >...And I get the following error: >"Undefined first referenced > symbol in file >--------- -------------- >main /lib/crt1.o > >ld: epsql: fatal error: Symbol referencing errors. No output written to >epsql" > >If I put a <main> function in my epsql.ec program, it compiles standalone, >but then I can't use the object to compile with any other programs. It >gives me the following error: >"ld: epsql.o: fatal error: symbol `main` multiply-defined, also in file >test.o" > >Alternatively, if I use the esql compiler on the epsql.ec program along with >a .c program (which contains a <main> function), then I'm ok. This is >certainly a circuitous workaround and not one which our operations >department is very fond of. > >Does anyone know why this mysterious "crt1.o" object file is requiring a ><main> function? I can't get our operations department to untie the >spaghetti of system changes that have occured since I last compiled >successfully. > >Thank you for your help. > > > -- David Williams