LibertyEiffel/Liberty — Issue #22: Issues with gcc 4.6 and external libraries
Author: tybor
Created: 2012-03-02 18:18:21+00:00
State: open

When compiling code that links with external dynamic linking libraries (.so) SmartEiffel generates a compilation command that does not work with gcc 4.6.
Specifically, at the end of the generated build script we get something like:
...
gcc -pipe -lzmq -lzmq -lzmq -o client zmq_example_client_T235.o ..... zmq_example_client_T0.o -x none

Beside the duplication of -lzmq option, gcc 4.6 needs the command issued like this:
gcc -pipe -o client zmq_example_client_T235.o ..... zmq_example_client_T0.o -x none -lzmq
to properly compile

See also http://stackoverflow.com/questions/8207464/linking-math-library-in-gcc-4-6-1-ubuntu-11-10