Re: Compiling C Program by Linking Object File generated from ".ec file."
Posted in 1999
Vikraman N wrote: > > Hi All, > > I have to compile a program "smain.c" , which calls a function > "sfunc",which is basically an "embbeded c file" with .ec extension > (i.e sfunc.ec.) > > I have got the object file of the function sfunc.ec named "sfunc.o" > archieved in the library called "libfunc.a." > > Now When I am trying to create a final executable for my main program > using "cc -o prog -dn -L./ smain.c -lfunc " If libfunc.a uses ESQL/C, you'd better do the linking with the ESQL/C compiler because otherwise, you don't get any of the ESQL/C references defined. esql -o prog -dn -L. smain.c -lfunc Your list of dots is not very helpful. Some names would have been more useful. >,by linking the library > containing the object file for that function I am getting the > following error: > > Error: > > Undefined first referenced > symbol in file > .................................................. > .................................................. > .................................................. > ld: prog: fatal error: Symbol referencing errors. No output written to > prog . > > (prog is the final executable.) > > Can anyone tell me why I am getting this error? > > Thanks in advance.(I am working DYNIX/ptx 4.0 V4.4.2 i386 version of > unix) > > Viky > > -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>