summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2010-09-20 22:07:27 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2010-09-20 22:07:27 (GMT)
commita779518cf92213c96cb06ba16b744d4b95d76c1c (patch)
treeda197cc7e5c736b6f7d479f32ef62ee4f4a7e9ce /c++
parentd688fc55a94acc6bdf43607e5224bc28009ee5e8 (diff)
downloadhdf5-a779518cf92213c96cb06ba16b744d4b95d76c1c.zip
hdf5-a779518cf92213c96cb06ba16b744d4b95d76c1c.tar.gz
hdf5-a779518cf92213c96cb06ba16b744d4b95d76c1c.tar.bz2
[svn-r19442] Move $LIBS to just after $lib_objs in the link command line. Otherwise the linker doesn't find the functions called by the program being compiled. $LIBS is ofr libraries specified by the compile script user.
We don't currently have any tests checked in to do this. Tested with netCDF-4 and hdf5 on jam.
Diffstat (limited to 'c++')
-rwxr-xr-xc++/src/h5c++.in17
1 files changed, 10 insertions, 7 deletions
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index b26d0a9..39d3d2a 100755
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -84,9 +84,10 @@ CXXLINKERBASE="@CXX@"
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
-# libraries in $link_args, followed by any external library paths and libraries
-# from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
@@ -365,10 +366,12 @@ if test "x$do_link" = "xyes"; then
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
- # libraries in $link_args, followed by any external library paths and libraries
- # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
- $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
+
+ $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
status=$?
fi