【问题标题】:compiling c code after linking pro C library generates linker error: undefined reference to function sqlcxt链接 pro C 库后编译 c 代码生成链接器错误:未定义对函数 sqlcxt 的引用
【发布时间】:2013-08-29 16:27:45
【问题描述】:

在 RedHat Linux 5.0 系统中,当我尝试使用包含 pro C 文件的目标文件的库编译 C 程序(C 程序调用 proc 函数)时,链接器会抛出类似“未定义对 sqlcxt 的引用(void * *,unsigned int *,struct sqlexd *,struct sqlcxp const *)"

我已经尝试链接 libclntsh.so 库并给出了库的路径,但我仍然无法成功链接。帮助和指导将不胜感激。提前致谢。

【问题讨论】:

    标签: gcc undefined linker-errors symbols


    【解决方案1】:

    这对我来说真的很糟糕(搜索了 3 天以上的几个小时)。最后,您需要告诉 PROC*C 代码将是 CPP,因此 PRO*C 会将外部“C”放在代码本身上。

    PCCFLAGS=ireclen=132 oreclen=132 select_error=no DBMS=V8 userid=dwqs999/workque@dev127.uprr.com sqlcheck=full mode=ANSI code=CPP lines=yes cpp_suffix=cpp

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-16
      • 2014-09-02
      • 1970-01-01
      • 2013-04-01
      • 1970-01-01
      • 2013-09-04
      • 2016-07-21
      相关资源
      最近更新 更多