0

So I finally cleared all the errors and warnings on the C files, and proceeded to link them. I have 2 C files which I need to link with the compiler.

et5ibwqm0.c intfac_fl.c

The compile command I was provided:

gcc -shared -o et5stcklib.so et5ibwqm0.o intfac_fl.o -L$FGLDIR/lib

Doesn't work, I get this error:

et5ibwqm0.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
4

2 回答 2

0

您使用 Informix 对此进行了标记。您是否正试图从 4GL 程序调用这些 C 模块,因此需要将它们组合成一个通用的可执行文件?

如果是这样,只需在编译指令中包含所有源模块。假设 c4gl,类似于:

c4gl main.4gl others.4gl et5ibwqm0.c intfac_fl.c -o mainwithccalls.4ge

于 2015-12-09T00:03:45.603 回答
0

原来它只是缺少 -m32 说明符,导致编译器拒绝其中一个对象 – user5586678

于 2016-02-25T14:20:54.293 回答