Error compile using c4gl
Posted in 2008
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi Masters, I try to compile script below using c4gl, but retun weird error like this /?ld: Unsatisfied symbol "eficb"........../ Here is the script ====================================================== #include "sqlfm.h" #define MODIFIED 1 /* To determine if record in an array has been modified */ int update_flag() { extern _EFICB *eficb; int mod_row = 0; if (eficb->_EFmodf == MODIFIED) ibm_lib4gl_returnMInt(1); else ibm_lib4gl_returnMInt(0); /* Pushing the mod_row back to 4GL */ return 1; }
If you are just compiling to an object file, add '-c' so the c4gl script and underlying esql/c and C compilers do not try to link the object without the proper libraries. Art On Wed, Dec 17, 2008 at 9:17 PM, Wahyu Cahyadi <wahyu@takaful.com> wrote: > Hi Masters, > > I try to compile script below using c4gl, but retun weird error like > this /?ld: Unsatisfied symbol "eficb"........../ > Here is the script > ====================================================== > #include "sqlfm.h" > > #define MODIFIED 1 > > /* To determine if record in an array has been modified */ > int update_flag() > { > extern _EFICB *eficb; > int mod_row = 0; > > if (eficb->_EFmodf == MODIFIED) > ibm_lib4gl_returnMInt(1); > else > ibm_lib4gl_returnMInt(0); > > /* Pushing the mod_row back to 4GL */ > return 1; > } > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
On Wed, Dec 17, 2008 at 6:20 PM, Art Kagel <art.kagel@gmail.com> wrote: > If you are just compiling to an object file, add '-c' so the c4gl script and > underlying esql/c and C compilers do not try to link the object without the > proper libraries. That might be sufficient. However, there's a good chance that the link will fail when combined with the program because there is a good chance that the symbol name change at release 7.31 (so the old name was eficb, but the new name is ... different -- actually, I can't immediately locate anything called eficb in I4GL 7.50.FC1). In general, old names are mapped to new names by the fglsys.h header, which should be included in C source. However, if the name is internal to I4GL, then there may not be (generally isn't) a published mapping. Sometimes you can deduce the new name with tools like 'strings'. In this case, I failed - the only EFICB variables I located were called _sqicb. > On Wed, Dec 17, 2008 at 9:17 PM, Wahyu Cahyadi <wahyu@takaful.com> wrote: > >> Hi Masters, >> >> I try to compile script below using c4gl, but retun weird error like >> this /?ld: Unsatisfied symbol "eficb"........../ >> Here is the script >> ====================================================== >> #include "sqlfm.h" >> >> #define MODIFIED 1 >> >> /* To determine if record in an array has been modified */ >> int update_flag() >> { >> extern _EFICB *eficb; >> int mod_row = 0; >> >> if (eficb->_EFmodf == MODIFIED) >> ibm_lib4gl_returnMInt(1); >> else >> ibm_lib4gl_returnMInt(0); >> >> /* Pushing the mod_row back to 4GL */ >> return 1; >> } >> >> >> >> > ******************************************************************************* >> Forum Note: Use "Reply" to post a response in the discussion forum. >> >> > > -- > Art S. Kagel > Oninit (www.oninit.com) > IIUG Board of Directors (art@iiug.org) > > Disclaimer: Please keep in mind that my own opinions are my own opinions and > do not reflect on my employer, Oninit, the IIUG, nor any other organization > with which I am associated either explicitly or implicitly. Neither do > those opinions reflect those of other individuals affiliated with any entity > with which I am affiliated nor those of the entities themselves. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.