Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22137

Informix 4GL shared object using gcc compile error

$
0
0

I am trying to compile an Informix 4GL program into a shared object on Linux, but I am getting a compile error. If your not familiar with Informix 4GL, it generates 4gl code into C code, then it uses gcc to compile C object files.

c4gl --help
Options starting with -g, -f, -m, -O, -W, or --param are automatically passed on to the various sub-processes invoked by cc.

Compile objects
c4gl -fPIC -c prog.4gl prog2.4gl
This generates prog.o prog2.o

Note that neither prog.4gl or prog2.4gl contains a main section, but is that needed for creating a shared object?

Create the shared object
c4gl -shared -o libMYLIB.so prog.o prog2.o

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function _start': (.text+0x20): undefined reference tomain'
collect2: error: ld returned 1 exit status
make: *** [libMYLIB.so] Error 1


Viewing all articles
Browse latest Browse all 22137

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>