user5586678
user5586678

Reputation: 1

have 2 C files which I need to link with the compiler

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

Upvotes: 0

Views: 151

Answers (2)

Armali
Armali

Reputation: 19375

Turns out it was just a missing -m32 specifier which caused the compiler to reject one of the objects – user5586678

Upvotes: 0

Dr. Scump
Dr. Scump

Reputation: 1

You tagged this with Informix. Are these C modules that you are trying to call from a 4GL program and therefore need to combine them into a common executable?

If so, just include all of your source modules in the compile directive. Assuming c4gl, something like:

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

Upvotes: 0

Related Questions