[linux proc] undefined reference to `ECPGget_sqlca' 问题解决

本文介绍了在Linux AS4环境下,使用proc进行编译时遇到的undefined reference to `ECPGget_sqlca'错误,并详细记录了通过修改/app/oracle/product/10.2.0/precomp/admin/pcscfg.cfg文件中的Oracle安装路径来解决这一问题的过程。

环境:linux as4

 

proc 编译选项 parse=full ,编译时报undefined reference to `ECPGget_sqlca',错误

 

后来修改/app/oracle/product/10.2.0/precomp/admin/pcscfg.cfg中,oracle的安装路径搞定

make clean && make bj_sim_jzn_rui_db2.exe && make clean make[1]: Entering directory '/home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2' rm -f bj_sim_jzn_rui_db2.o bj_sim_jzn_rui_db2.c make[1]: Leaving directory '/home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2' make[1]: Entering directory '/home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2' /usr/pgsql-17/bin/ecpg -r no_indicator -I. -I/usr/pgsql-17/include bj_sim_jzn_rui_db2.pgc gcc -S -I. -I/usr/pgsql-17/include -I../../../include -Wall -Wextra -Wno-int-conversion -Wno-unused-parameter -Wno-stringop-truncation -Wno-implicit-function-declaration -O3 bj_sim_jzn_rui_db2.c gcc -S -I. -I/usr/pgsql-17/include -I../../../include -g -masm=intel bj_sim_jzn_rui_db2.c rm -f *.s gcc -c -I. -I/usr/pgsql-17/include -I../../../include -g bj_sim_jzn_rui_db2.c gcc -I. -I/usr/pgsql-17/include -I../../../include -g -o bj_sim_jzn_rui_db2.exe bj_sim_jzn_rui_db2.o ../../../lib/libBJZ_common.a /usr/bin/ld: bj_sim_jzn_rui_db2.o: in function `main_proc': /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:386: undefined reference to `ECPGprepare' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:387: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:392: undefined reference to `ECPGprepared_statement' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:392: undefined reference to `ECPGdo' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:393: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:394: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:394: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:399: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:415: undefined reference to `ECPGdo' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:434: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:434: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:435: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:440: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:512: undefined reference to `ECPGdo' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:513: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2/bj_sim_jzn_rui_db2.pgc:531: undefined reference to `ECPGget_sqlca' /usr/bin/ld: ../../../lib/libBJZ_common.a(fvs_z_sql.o): in function `fvs_z_sql_connect': /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:59: undefined reference to `ECPGconnect' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:60: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:63: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:69: undefined reference to `ECPGdo' /usr/bin/ld: ../../../lib/libBJZ_common.a(fvs_z_sql.o): in function `fvs_z_sql_commit': /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:109: undefined reference to `ECPGtrans' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:111: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:114: undefined reference to `ECPGget_sqlca' /usr/bin/ld: ../../../lib/libBJZ_common.a(fvs_z_sql.o): in function `fvs_z_sql_rollback': /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:142: undefined reference to `ECPGtrans' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:144: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:147: undefined reference to `ECPGget_sqlca' /usr/bin/ld: ../../../lib/libBJZ_common.a(fvs_z_sql.o): in function `fvs_z_dbstatus': /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:164: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:182: undefined reference to `ECPGget_sqlca' /usr/bin/ld: /home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:183: undefined reference to `ECPGget_sqlca' /usr/bin/ld: ../../../lib/libBJZ_common.a(fvs_z_sql.o):/home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/lib_common/fvs_z_sql.pgc:213: more undefined references to `ECPGget_sqlca' follow collect2: error: ld returned 1 exit status make[1]: *** [Makefile:45: bj_sim_jzn_rui_db2.exe] Error 1 make[1]: Leaving directory '/home/bx01/git/bx-db-server/program/svol01/bj/src/c/src/B_BJ_SIM11_080/bj_sim_jzn_rui_db2' make: *** [Makefile:41: all] Error 2
最新发布
08-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值