Re: Compiling C Program by Linking Object File generated from ".ec file."
Posted in 1999
Hi, Just use: esql -o prog .... or get the list of libraries to be linked into your program using esql -libs Best Regards, Octav On Tue, Aug 03, 1999 at 08:26:18AM -0600, Vikraman N wrote: > > --------------BCAE01C6A2315621117F048A > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: 7bit > > 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 ",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 > > > > --------------BCAE01C6A2315621117F048A > Content-Type: text/html; charset=us-ascii > Content-Transfer-Encoding: 7bit > > <HTML> > Hi All, > > <P>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.) > > <P>I have got the object file of the function sfunc.ec named "sfunc.o" > archieved in the library called "libfunc.a." > > <P>Now When I am trying to create a final executable for my main program > using "<B>cc -o prog -dn -L./ smain.c -lfunc</B> ",by linking the > library containing the object file for that function I am getting the following > error: > > <P><B><U>Error:</U></B> > > <P>Undefined > first referenced > <BR> symbol > in file > <BR>.................................................. > <BR>.................................................. > <BR>.................................................. > <BR>ld: prog: fatal error: Symbol referencing errors. No output written > to prog . > > <P>(prog is the final executable.) > > <P>Can anyone tell me why I am getting this error? > > <P>Thanks in advance.(I am working DYNIX/ptx 4.0 V4.4.2 i386 version of > unix) > > <P>Viky > <BR> > <BR> </HTML> > > --------------BCAE01C6A2315621117F048A-- > > -- Octav Chiriac Phone: (373) 2 22 99 67 NetInfo S.R.L. Fax: (373) 2 21 36 59 Chisinau (373) 2 22 84 88 Moldova, Republic of mailto:com@netinfo-moldova.com