> - The changes we had to make with IPOL codes and newer versions of compilers > where all related to the build procedure, not to the source code itself > (correct me if I am wrong). For example, there was an important > restriction in gcc 4.7 with respect to the order of link libraries > (former versions were more forgiving).
I just checked, and indeed previous versions were forgiving but the
compile options were wrong with respect to the standard and now gcc
enforces a standard-compliant sequence of options. The POSIX
definition of c99[1] says:
SYNOPSIS
c99 [options...] pathname [[pathname] [-I directory]
[-L directory] [-l library]]...
-> source or compiled files ("pathname") must be mentioned before the
libraries
-l library
Search the library named liblibrary.a. A library shall be
searched when its name is encountered, so the placement of a
-l option is significant. [..]
-> an unresolved symbol encountered in a library searched by a -l
option must be searched in another library searched by a -l option
placed AFTER the first opne.
PS: This is just to clarify these details based on POSIX standards, I
am not contradicting anyone in this discussion. The only point is that
now gcc does the right thing.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
--
Nicolas LIMARE
http://nicolas.limare.net/ pgp:0xFA423F4F
signature.asc
Description: Digital signature
-- IPOL - Image Processing On Line - http://ipol.im/ contact [email protected] - http://www.ipol.im/meta/contact/ news+feeds twitter @IPOL_journal - http://www.ipol.im/meta/feeds/ announces [email protected] - http://tools.ipol.im/mm/announce/ discussions [email protected] - http://tools.ipol.im/mm/discuss/
