Hi, I try to comiple ctest.c and simple.c into libCFUNCTIONS.so,I perform the comand line succcessfully as follows, jcompile ctest.c simple.c -d -s libCFUNCTIONS.so And then I compile CHKXVERIFYPAYPWD.b and link libCFUNCTIONS as follows, jcompile XVCHKXVERIFYPAYPWD.b -L. -l CFUNCTION when i perform this command line, error is thrown as follows,
ld: 0711-317 ERROR: Undefined symbol: jBASEMainFunctionPointer ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. xlc_r -qrtti=all -qro -qroconst -q64 - qinfo=cmp:cns:cnv:eff:enu:ini:lan:ret - qsuppress=1500-010:1500-029:1506-435:1540-1408:1540-5301:1540-1407:1540-5338:1540-5344:1506-446 -qcpluscmt -qthreaded -brtl -bnolibpath XVCHKXVERIFYPAYPWD.o /app/ t24core/bnk/TAFC/bin/jmainfunction.o -L/app/t24core/bnk/TAFC/lib - lTAFCfrmwrk -lTAFCjbase -lTAFCutil -lTAFCjee -lm -lcurses -lrts -L. - lCFUNCTIONS -oXVCHKXVERIFYPAYPWD failed , command returned a code of 8 jcompile: XVCHKXVERIFYPAYPWD.j deleted jcompile: XVCHKXVERIFYPAYPWD.c deleted jcompile: Returned an error code of 8 it shows Undefined symbol: jBASEMainFunctionPointer. why? Do you meet this problem? Regards, Jim.cnt On Jun 21, 8:32 pm, Marco Manyevere <[email protected]> wrote: > Hi, > > I find it easier to compile the *.c and *.b into one shared library as > follows (works for me in jBASE 5): > > jcompile TEST.BP/CTest.c TEST.BP/Simple.c TEST.BP/VCHKXVERIFYPAYPWD.b -d -s > xllib/TESTLIBRARY.so > Directories TEST.BP and xllib are off the current directory (bnk.run if > T24) otherwise change accordingly. xllib is in your JBCOBJECTLIST. After > successful compilation, log out of AIX and log back in then fire your test. > > Regards, > > On 21 June 2012 12:22, Jim.cnt <[email protected]> wrote: > > > > > Hi, > > Sorry! The code line 'STORE_BBS(strErrmsg, prtErrmsg); ' in simple.c > > is redundant', so simple.c needn't include 'jsystem.h' header. I > > delete this line, as follows > > > source Simple.c > > > #include "simple.h" > > int VerifyPayCodeAAA(unsigned char* pClientPkg,unsigned char* > > strErrmsg) { > > char *prtErrmsg; > > memcpy(strErrmsg, "hello, this is test", 30); > > return 0; > > } > > > After run the ksh script to compile and link, I run TESTCHK, the same > > error message is thrown. > > > I will use DEFCE to test. > > > Do you think my ksh script is correct fully?. > > > Thanks & Regards, > > > On 6月21日, 下午4时09分, Marco Manyevere <[email protected]> wrote: > > > Hi, > > > > Is because you don't #include <jsystem.h> in Simple.c. Having made that > > > correction you may need to pay attention to what the program is actually > > > trying to do because I think after that correction it probably won't > > > compile or run correctly. > > > > I always try and keep the C code from mixing with jBASE undocumented > > > functions and its usually easy to do except in very complicated > > situations. > > > In most cases you can get away by using the simpler DEFCE interface. > > > > Regards, > > > > On 21 June 2012 04:40, Jim.cnt <[email protected]> wrote: > > > > > hi, > > > > For requirement,I write a jbase subroutine and two C program. They > > > > are named VCHKXVERIFYPAYPWD.b, CTest.c and Simple.c . Their Logics are > > > > that VCHKXVERIFYPAYPWD.b call CTest.c and CTest.c call Simple.c . > > > > I use ksh script complie and link those .b and .c program. Ksh script > > > > runs successfully. > > > > After running ksh script, I use a jbase program 'TESTCHK' call > > > > subroutine VCHKXVERIFYPAYPWD and error messge is thrown as the > > > > following: > > > > > jBASE: /app/t24core/bnk/bnk.run/xllib/libdraft.so: rtld: 0712-001 > > > > Symbol STORE_BBS was referenced > > > > from module /app/t24core/bnk/bnk.run/xllib/libcipher.a(), but a > > > > runtime definition > > > > of the symbol was not found. > > > > rtld: 0712-002 fatal error: exiting. > > > > ** Error [ SUBROUTINE_CALL_FAIL ] ** > > > > Unable to perform CALL to subroutine VCHKXVERIFYPAYPWD , Line 3 , > > > > Source TESTCHK > > > > Press C to continue or Q to quit > > > > Trap from an error message, error message name = SUBROUTINE_CALL_FAIL > > > > Source changed to .//TESTCHK > > > > > I'm troubled in this problem for three days. I try to solve this > > > > problem,but it still is a puzzle. I think that maybe my ksh script is > > > > incorrect or enviroment config configuration need be change. I expect > > > > to obtain your help. > > > > My operator system is AIX 6.1. > > > ***************************************************************************--********************** > > > > ksh script Build6.ksh > > > > > cc -q64 -c Simple.c > > > > jcompile -c CTest.c > > > > xlc -G -q64 -qmkshrobj -o $JBCDEV_LIB/libshr1.so simple.o ctest.o > > > > export LIBPATH=$PWD:$LIBPATH > > > > export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH > > > > export SHLIB_PATH=$PWD:$SHLIB_PATH > > > > jcompile -Qs $JBCDEV_LIB/libdraft.sl -L. -lshr1 VCHKXVERIFYPAYPWD.b > > > > > ========================================================= > > > > VCHKXVERIFYPAYPWD.b > > > > > SUBROUTINE VCHKXVERIFYPAYPWD > > > > > DEFC INT ABC(VAR,VAR) > > > > > RETURN.CODE = -1 > > > > R.ERROR.MSG = '' > > > > > P1 = "hi test test" > > > > > RETURN.CODE = ABC(P1, R.ERROR.MSG) > > > > CRT "RTN.MSG=" :R.ERROR.MSG > > > > CRT "RETURN.CODE=" : RETURN.CODE > > > > RETURN > > > > END > > > > > ========================================================== > > > > > CTest.c > > > > > #include <jsystem.h> > > > > #include <assert.h> > > > > #include "stdhead.h" > > > > #include "simple.h" > > > > #define HOME "HOME" > > > > > #ifdef DPSTRUCT_DEF > > > > #define JBASEDP DPSTRUCT *dp, > > > > #else > > > > #define JBASEDP > > > > #endif > > > > > INT32 ABC(JBASEDP VAR *param1, VAR *Result) > > > > { > > > > INT32 ret; > > > > char *ptrParam1, *ptrResult; > > > > char aResult[11]; > > > > ptrParam1 = (char *)CONV_SFB(param1); > > > > ptrResult = (char *)CONV_SFB(Result); > > > > ret = VerifyPayCodeAAA(ptrParam1, ptrResult); > > > > STORE_BBS(Result, ptrResult); > > > > return ret; > > > > > } > > > > > ======================================================== > > > > source Simple.c > > > > > #include "simple.h" > > > > int VerifyPayCodeAAA(unsigned char* pClientPkg,unsigned char* > > > > strErrmsg) { > > > > char *prtErrmsg; > > > > memcpy(strErrmsg, "hello, this is test", 30); > > > > STORE_BBS(strErrmsg, prtErrmsg); > > > > return 0; > > > > } > > > > > ========================================================= > > > > source simple.h > > > > > int VerifyPayCodeAAA(unsigned char* pClientPkg,unsigned char* > > > > strErrmsg); > > > > > ========================================================== > > > > source stdhead.h > > > > > #ifndef _STDHEAD_H_MYCM_DDM_19991014_ > > > > #define _STDHEAD_H_MYCM_DDM_19991014_ > > > > > #include <stdio.h> > > > > #include <stdlib.h> > > > > #include <string.h> > > > > #include <memory.h> > > > > #include <time.h> > > > > //#include <bool.h> > > > > #include <errno.h> > > > > #include <time.h> > > > > #include <signal.h> > > > > #include <unistd.h> > > > > #include <termio.h> > > > > #include <fcntl.h> > > > > > #include <sys/ipc.h> > > > > #include <sys/msg.h> > > > > #include <sys/sem.h> > > > > #include <sys/types.h> > > > > #include <sys/socket.h> > > > > > #include <netinet/in.h> > > > > #include <arpa/inet.h> > > > > > #ifndef BYTE > > > > typedef unsigned char BYTE; > > > > #endif > > > > > #ifndef BOOL > > > > typedef unsigned char BOOL; > > > > #endif > > > > > typedef int SOCKET; > > > > typedef unsigned int UINT; > > > > typedef unsigned char UCHAR; > > > > typedef unsigned short WORD; > > > > #endif > > > > > -- > > > > -- > > > > IMPORTANT: T24/Globus posts are no longer accepted on this forum. > > > > > To post, send email to [email protected] > > > > To unsubscribe, send email to [email protected] > > > > For more options, visit this group at > > > >http://groups.google.com/group/jBASE?hl=en-隐藏被引用文字 - > > > > - 显示引用的文字 - > > > -- > > -- > > IMPORTANT: T24/Globus posts are no longer accepted on this forum. > > > To post, send email to [email protected] > > To unsubscribe, send email to [email protected] > > For more options, visit this group at > >http://groups.google.com/group/jBASE?hl=en- Hide quoted text - > > - Show quoted text - -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
