I am trying to run a program that uses libmfhdf, but I get a ton of
undefined reference errors.
I'm using linux mint and I installed HDF4 using:
./configure --with-gnu-ld --enable-shared --disable-fortran
make
sudo make install
I can't figure out where I messed up. I also tried:
gmake >& gmake.out
gmake install
But I got the same results.
Also when I use ld -lmfhdf --verbose I get these undefined references:
//lib/libmfhdf.so: undefined reference to `Hoffset'
//lib/libmfhdf.so: undefined reference to `Hdeldd'
//lib/libmfhdf.so: undefined reference to `VSwrite'
//lib/libmfhdf.so: undefined reference to `VSinquire'
//lib/libmfhdf.so: undefined reference to `ANend'
//lib/libmfhdf.so: undefined reference to `Hopen'
//lib/libmfhdf.so: undefined reference to `HMCwriteChunk'
//lib/libmfhdf.so: undefined reference to `VSattach'
//lib/libmfhdf.so: undefined reference to `Vaddtagref'
//lib/libmfhdf.so: undefined reference to `VSseek'
//lib/libmfhdf.so: undefined reference to `Vntagrefs'
//lib/libmfhdf.so: undefined reference to `Hclose'
//lib/libmfhdf.so: undefined reference to `HCcreate'
//lib/libmfhdf.so: undefined reference to `HCPgetcompinfo'
//lib/libmfhdf.so: undefined reference to `HEPclear'
//lib/libmfhdf.so: undefined reference to `Hnewref'
//lib/libmfhdf.so: undefined reference to `HDmemfill'
//lib/libmfhdf.so: undefined reference to `Vdetach'
//lib/libmfhdf.so: undefined reference to `VSread'
//lib/libmfhdf.so: undefined reference to `Hnextread'
//lib/libmfhdf.so: undefined reference to `Hsetaccesstype'
//lib/libmfhdf.so: undefined reference to `DFKconvert'
//lib/libmfhdf.so: undefined reference to `ANselect'
//lib/libmfhdf.so: undefined reference to `ANreadann'
//lib/libmfhdf.so: undefined reference to `ANstart'
//lib/libmfhdf.so: undefined reference to `Vgetclass'
//lib/libmfhdf.so: undefined reference to `DFKislitendNT'
//lib/libmfhdf.so: undefined reference to `DFKisnativeNT'
//lib/libmfhdf.so: undefined reference to `Vgetnext'
//lib/libmfhdf.so: undefined reference to `VSdelete'
//lib/libmfhdf.so: undefined reference to `Visvs'
//lib/libmfhdf.so: undefined reference to `ANannlen'
//lib/libmfhdf.so: undefined reference to `Visvg'
//lib/libmfhdf.so: undefined reference to `VSdetach'
//lib/libmfhdf.so: undefined reference to `Hinquire'
//lib/libmfhdf.so: undefined reference to `HCPgetcompress'
//lib/libmfhdf.so: undefined reference to `VSsetclass'
//lib/libmfhdf.so: undefined reference to `Hishdf'
//lib/libmfhdf.so: undefined reference to `Hseek'
//lib/libmfhdf.so: undefined reference to `HCPgetdatasize'
//lib/libmfhdf.so: undefined reference to `VSfdefine'
//lib/libmfhdf.so: undefined reference to `Vinquire'
//lib/libmfhdf.so: undefined reference to `HCget_config_info'
//lib/libmfhdf.so: undefined reference to `HDget_special_info'
//lib/libmfhdf.so: undefined reference to `DFdisetup'
//lib/libmfhdf.so: undefined reference to `HEpush'
//lib/libmfhdf.so: undefined reference to `VSgetname'
//lib/libmfhdf.so: undefined reference to `HXcreate'
//lib/libmfhdf.so: undefined reference to `DFdiput'
//lib/libmfhdf.so: undefined reference to `ANgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Hstartaccess'
//lib/libmfhdf.so: undefined reference to `VHstoredata'
//lib/libmfhdf.so: undefined reference to `VSsetfields'
//lib/libmfhdf.so: undefined reference to `Vfindclass'
//lib/libmfhdf.so: undefined reference to `VFfieldtype'
//lib/libmfhdf.so: undefined reference to `HLcreate'
//lib/libmfhdf.so: undefined reference to `VHmakegroup'
//lib/libmfhdf.so: undefined reference to `DFKNTsize'
//lib/libmfhdf.so: undefined reference to `VSgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Vdelete'
//lib/libmfhdf.so: undefined reference to `HLgetblockinfo'
//lib/libmfhdf.so: undefined reference to `Hstartread'
//lib/libmfhdf.so: undefined reference to `DFKgetPNSC'
//lib/libmfhdf.so: undefined reference to `HDgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Hgetelement'
//lib/libmfhdf.so: undefined reference to `HEvalue'
//lib/libmfhdf.so: undefined reference to `DFdiwrite'
//lib/libmfhdf.so: undefined reference to `HDcheck_empty'
//lib/libmfhdf.so: undefined reference to `Hwrite'
//lib/libmfhdf.so: undefined reference to `Vattach'
//lib/libmfhdf.so: undefined reference to `HCPgetcomptype'
//lib/libmfhdf.so: undefined reference to `HPisfile_in_use'
//lib/libmfhdf.so: undefined reference to `Hread'
//lib/libmfhdf.so: undefined reference to `Vgettagref'
//lib/libmfhdf.so: undefined reference to `HMCreadChunk'
//lib/libmfhdf.so: undefined reference to `VHstoredatam'
//lib/libmfhdf.so: undefined reference to `ANnumann'
//lib/libmfhdf.so: undefined reference to `DFdiget'
//lib/libmfhdf.so: undefined reference to `VFfieldorder'
//lib/libmfhdf.so: undefined reference to `HMCcreate'
//lib/libmfhdf.so: undefined reference to `Hlength'
//lib/libmfhdf.so: undefined reference to `ANannlist'
//lib/libmfhdf.so: undefined reference to `vexistvg'
//lib/libmfhdf.so: undefined reference to `DFdiread'
//lib/libmfhdf.so: undefined reference to `Vfinish'
//lib/libmfhdf.so: undefined reference to `Vinitialize'
//lib/libmfhdf.so: undefined reference to `vexistvs'
//lib/libmfhdf.so: undefined reference to `ANendaccess'
//lib/libmfhdf.so: undefined reference to `DFKsetNT'
//lib/libmfhdf.so: undefined reference to `HMCsetMaxcache'
//lib/libmfhdf.so: undefined reference to `Hsetlength'
//lib/libmfhdf.so: undefined reference to `error_top'
//lib/libmfhdf.so: undefined reference to `Hputelement'
//lib/libmfhdf.so: undefined reference to `HPregister_term_func'
//lib/libmfhdf.so: undefined reference to `Hendaccess'
//lib/libmfhdf.so: undefined reference to `VSQueryref'
//lib/libmfhdf.so: undefined reference to `VSgetclass'
//lib/libmfhdf.so: undefined reference to `ANfileinfo'
Thank you for your time,
Jack
Hello Jack,
Please try adding -ldf to after -lmfhdf. libmfhdf needs libdf which provides those undefined functions.
Thanks,
Binh-Minh
···
________________________________
From: Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org> on behalf of Jack Guillory <jack.p.guillory@gmail.com>
Sent: Wednesday, June 29, 2016 8:53 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] Help with libmfhdf undefined references
I am trying to run a program that uses libmfhdf, but I get a ton of undefined reference errors.
I'm using linux mint and I installed HDF4 using:
./configure --with-gnu-ld --enable-shared --disable-fortran
make
sudo make install
I can't figure out where I messed up. I also tried:
gmake >& gmake.out
gmake install
But I got the same results.
Also when I use ld -lmfhdf --verbose I get these undefined references:
//lib/libmfhdf.so: undefined reference to `Hoffset'
//lib/libmfhdf.so: undefined reference to `Hdeldd'
//lib/libmfhdf.so: undefined reference to `VSwrite'
//lib/libmfhdf.so: undefined reference to `VSinquire'
//lib/libmfhdf.so: undefined reference to `ANend'
//lib/libmfhdf.so: undefined reference to `Hopen'
//lib/libmfhdf.so: undefined reference to `HMCwriteChunk'
//lib/libmfhdf.so: undefined reference to `VSattach'
//lib/libmfhdf.so: undefined reference to `Vaddtagref'
//lib/libmfhdf.so: undefined reference to `VSseek'
//lib/libmfhdf.so: undefined reference to `Vntagrefs'
//lib/libmfhdf.so: undefined reference to `Hclose'
//lib/libmfhdf.so: undefined reference to `HCcreate'
//lib/libmfhdf.so: undefined reference to `HCPgetcompinfo'
//lib/libmfhdf.so: undefined reference to `HEPclear'
//lib/libmfhdf.so: undefined reference to `Hnewref'
//lib/libmfhdf.so: undefined reference to `HDmemfill'
//lib/libmfhdf.so: undefined reference to `Vdetach'
//lib/libmfhdf.so: undefined reference to `VSread'
//lib/libmfhdf.so: undefined reference to `Hnextread'
//lib/libmfhdf.so: undefined reference to `Hsetaccesstype'
//lib/libmfhdf.so: undefined reference to `DFKconvert'
//lib/libmfhdf.so: undefined reference to `ANselect'
//lib/libmfhdf.so: undefined reference to `ANreadann'
//lib/libmfhdf.so: undefined reference to `ANstart'
//lib/libmfhdf.so: undefined reference to `Vgetclass'
//lib/libmfhdf.so: undefined reference to `DFKislitendNT'
//lib/libmfhdf.so: undefined reference to `DFKisnativeNT'
//lib/libmfhdf.so: undefined reference to `Vgetnext'
//lib/libmfhdf.so: undefined reference to `VSdelete'
//lib/libmfhdf.so: undefined reference to `Visvs'
//lib/libmfhdf.so: undefined reference to `ANannlen'
//lib/libmfhdf.so: undefined reference to `Visvg'
//lib/libmfhdf.so: undefined reference to `VSdetach'
//lib/libmfhdf.so: undefined reference to `Hinquire'
//lib/libmfhdf.so: undefined reference to `HCPgetcompress'
//lib/libmfhdf.so: undefined reference to `VSsetclass'
//lib/libmfhdf.so: undefined reference to `Hishdf'
//lib/libmfhdf.so: undefined reference to `Hseek'
//lib/libmfhdf.so: undefined reference to `HCPgetdatasize'
//lib/libmfhdf.so: undefined reference to `VSfdefine'
//lib/libmfhdf.so: undefined reference to `Vinquire'
//lib/libmfhdf.so: undefined reference to `HCget_config_info'
//lib/libmfhdf.so: undefined reference to `HDget_special_info'
//lib/libmfhdf.so: undefined reference to `DFdisetup'
//lib/libmfhdf.so: undefined reference to `HEpush'
//lib/libmfhdf.so: undefined reference to `VSgetname'
//lib/libmfhdf.so: undefined reference to `HXcreate'
//lib/libmfhdf.so: undefined reference to `DFdiput'
//lib/libmfhdf.so: undefined reference to `ANgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Hstartaccess'
//lib/libmfhdf.so: undefined reference to `VHstoredata'
//lib/libmfhdf.so: undefined reference to `VSsetfields'
//lib/libmfhdf.so: undefined reference to `Vfindclass'
//lib/libmfhdf.so: undefined reference to `VFfieldtype'
//lib/libmfhdf.so: undefined reference to `HLcreate'
//lib/libmfhdf.so: undefined reference to `VHmakegroup'
//lib/libmfhdf.so: undefined reference to `DFKNTsize'
//lib/libmfhdf.so: undefined reference to `VSgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Vdelete'
//lib/libmfhdf.so: undefined reference to `HLgetblockinfo'
//lib/libmfhdf.so: undefined reference to `Hstartread'
//lib/libmfhdf.so: undefined reference to `DFKgetPNSC'
//lib/libmfhdf.so: undefined reference to `HDgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Hgetelement'
//lib/libmfhdf.so: undefined reference to `HEvalue'
//lib/libmfhdf.so: undefined reference to `DFdiwrite'
//lib/libmfhdf.so: undefined reference to `HDcheck_empty'
//lib/libmfhdf.so: undefined reference to `Hwrite'
//lib/libmfhdf.so: undefined reference to `Vattach'
//lib/libmfhdf.so: undefined reference to `HCPgetcomptype'
//lib/libmfhdf.so: undefined reference to `HPisfile_in_use'
//lib/libmfhdf.so: undefined reference to `Hread'
//lib/libmfhdf.so: undefined reference to `Vgettagref'
//lib/libmfhdf.so: undefined reference to `HMCreadChunk'
//lib/libmfhdf.so: undefined reference to `VHstoredatam'
//lib/libmfhdf.so: undefined reference to `ANnumann'
//lib/libmfhdf.so: undefined reference to `DFdiget'
//lib/libmfhdf.so: undefined reference to `VFfieldorder'
//lib/libmfhdf.so: undefined reference to `HMCcreate'
//lib/libmfhdf.so: undefined reference to `Hlength'
//lib/libmfhdf.so: undefined reference to `ANannlist'
//lib/libmfhdf.so: undefined reference to `vexistvg'
//lib/libmfhdf.so: undefined reference to `DFdiread'
//lib/libmfhdf.so: undefined reference to `Vfinish'
//lib/libmfhdf.so: undefined reference to `Vinitialize'
//lib/libmfhdf.so: undefined reference to `vexistvs'
//lib/libmfhdf.so: undefined reference to `ANendaccess'
//lib/libmfhdf.so: undefined reference to `DFKsetNT'
//lib/libmfhdf.so: undefined reference to `HMCsetMaxcache'
//lib/libmfhdf.so: undefined reference to `Hsetlength'
//lib/libmfhdf.so: undefined reference to `error_top'
//lib/libmfhdf.so: undefined reference to `Hputelement'
//lib/libmfhdf.so: undefined reference to `HPregister_term_func'
//lib/libmfhdf.so: undefined reference to `Hendaccess'
//lib/libmfhdf.so: undefined reference to `VSQueryref'
//lib/libmfhdf.so: undefined reference to `VSgetclass'
//lib/libmfhdf.so: undefined reference to `ANfileinfo'
Thank you for your time,
Jack
That worked perfectly. Thank you Binh-Minh.
Respectfully,
Jack
···
On Thu, Jul 7, 2016 at 12:20 AM, Binh-Minh Ribler <bmribler@hdfgroup.org> wrote:
Hello Jack,
Please try adding -ldf to after -lmfhdf. libmfhdf needs libdf which
provides those undefined functions.
Thanks,
Binh-Minh
------------------------------
*From:* Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org> on behalf of
Jack Guillory <jack.p.guillory@gmail.com>
*Sent:* Wednesday, June 29, 2016 8:53 AM
*To:* hdf-forum@lists.hdfgroup.org
*Subject:* [Hdf-forum] Help with libmfhdf undefined references
I am trying to run a program that uses libmfhdf, but I get a ton of
undefined reference errors.
I'm using linux mint and I installed HDF4 using:
./configure --with-gnu-ld --enable-shared --disable-fortran
make
sudo make install
I can't figure out where I messed up. I also tried:
gmake >& gmake.out
gmake install
But I got the same results.
Also when I use ld -lmfhdf --verbose I get these undefined references:
//lib/libmfhdf.so: undefined reference to `Hoffset'
//lib/libmfhdf.so: undefined reference to `Hdeldd'
//lib/libmfhdf.so: undefined reference to `VSwrite'
//lib/libmfhdf.so: undefined reference to `VSinquire'
//lib/libmfhdf.so: undefined reference to `ANend'
//lib/libmfhdf.so: undefined reference to `Hopen'
//lib/libmfhdf.so: undefined reference to `HMCwriteChunk'
//lib/libmfhdf.so: undefined reference to `VSattach'
//lib/libmfhdf.so: undefined reference to `Vaddtagref'
//lib/libmfhdf.so: undefined reference to `VSseek'
//lib/libmfhdf.so: undefined reference to `Vntagrefs'
//lib/libmfhdf.so: undefined reference to `Hclose'
//lib/libmfhdf.so: undefined reference to `HCcreate'
//lib/libmfhdf.so: undefined reference to `HCPgetcompinfo'
//lib/libmfhdf.so: undefined reference to `HEPclear'
//lib/libmfhdf.so: undefined reference to `Hnewref'
//lib/libmfhdf.so: undefined reference to `HDmemfill'
//lib/libmfhdf.so: undefined reference to `Vdetach'
//lib/libmfhdf.so: undefined reference to `VSread'
//lib/libmfhdf.so: undefined reference to `Hnextread'
//lib/libmfhdf.so: undefined reference to `Hsetaccesstype'
//lib/libmfhdf.so: undefined reference to `DFKconvert'
//lib/libmfhdf.so: undefined reference to `ANselect'
//lib/libmfhdf.so: undefined reference to `ANreadann'
//lib/libmfhdf.so: undefined reference to `ANstart'
//lib/libmfhdf.so: undefined reference to `Vgetclass'
//lib/libmfhdf.so: undefined reference to `DFKislitendNT'
//lib/libmfhdf.so: undefined reference to `DFKisnativeNT'
//lib/libmfhdf.so: undefined reference to `Vgetnext'
//lib/libmfhdf.so: undefined reference to `VSdelete'
//lib/libmfhdf.so: undefined reference to `Visvs'
//lib/libmfhdf.so: undefined reference to `ANannlen'
//lib/libmfhdf.so: undefined reference to `Visvg'
//lib/libmfhdf.so: undefined reference to `VSdetach'
//lib/libmfhdf.so: undefined reference to `Hinquire'
//lib/libmfhdf.so: undefined reference to `HCPgetcompress'
//lib/libmfhdf.so: undefined reference to `VSsetclass'
//lib/libmfhdf.so: undefined reference to `Hishdf'
//lib/libmfhdf.so: undefined reference to `Hseek'
//lib/libmfhdf.so: undefined reference to `HCPgetdatasize'
//lib/libmfhdf.so: undefined reference to `VSfdefine'
//lib/libmfhdf.so: undefined reference to `Vinquire'
//lib/libmfhdf.so: undefined reference to `HCget_config_info'
//lib/libmfhdf.so: undefined reference to `HDget_special_info'
//lib/libmfhdf.so: undefined reference to `DFdisetup'
//lib/libmfhdf.so: undefined reference to `HEpush'
//lib/libmfhdf.so: undefined reference to `VSgetname'
//lib/libmfhdf.so: undefined reference to `HXcreate'
//lib/libmfhdf.so: undefined reference to `DFdiput'
//lib/libmfhdf.so: undefined reference to `ANgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Hstartaccess'
//lib/libmfhdf.so: undefined reference to `VHstoredata'
//lib/libmfhdf.so: undefined reference to `VSsetfields'
//lib/libmfhdf.so: undefined reference to `Vfindclass'
//lib/libmfhdf.so: undefined reference to `VFfieldtype'
//lib/libmfhdf.so: undefined reference to `HLcreate'
//lib/libmfhdf.so: undefined reference to `VHmakegroup'
//lib/libmfhdf.so: undefined reference to `DFKNTsize'
//lib/libmfhdf.so: undefined reference to `VSgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Vdelete'
//lib/libmfhdf.so: undefined reference to `HLgetblockinfo'
//lib/libmfhdf.so: undefined reference to `Hstartread'
//lib/libmfhdf.so: undefined reference to `DFKgetPNSC'
//lib/libmfhdf.so: undefined reference to `HDgetdatainfo'
//lib/libmfhdf.so: undefined reference to `Hgetelement'
//lib/libmfhdf.so: undefined reference to `HEvalue'
//lib/libmfhdf.so: undefined reference to `DFdiwrite'
//lib/libmfhdf.so: undefined reference to `HDcheck_empty'
//lib/libmfhdf.so: undefined reference to `Hwrite'
//lib/libmfhdf.so: undefined reference to `Vattach'
//lib/libmfhdf.so: undefined reference to `HCPgetcomptype'
//lib/libmfhdf.so: undefined reference to `HPisfile_in_use'
//lib/libmfhdf.so: undefined reference to `Hread'
//lib/libmfhdf.so: undefined reference to `Vgettagref'
//lib/libmfhdf.so: undefined reference to `HMCreadChunk'
//lib/libmfhdf.so: undefined reference to `VHstoredatam'
//lib/libmfhdf.so: undefined reference to `ANnumann'
//lib/libmfhdf.so: undefined reference to `DFdiget'
//lib/libmfhdf.so: undefined reference to `VFfieldorder'
//lib/libmfhdf.so: undefined reference to `HMCcreate'
//lib/libmfhdf.so: undefined reference to `Hlength'
//lib/libmfhdf.so: undefined reference to `ANannlist'
//lib/libmfhdf.so: undefined reference to `vexistvg'
//lib/libmfhdf.so: undefined reference to `DFdiread'
//lib/libmfhdf.so: undefined reference to `Vfinish'
//lib/libmfhdf.so: undefined reference to `Vinitialize'
//lib/libmfhdf.so: undefined reference to `vexistvs'
//lib/libmfhdf.so: undefined reference to `ANendaccess'
//lib/libmfhdf.so: undefined reference to `DFKsetNT'
//lib/libmfhdf.so: undefined reference to `HMCsetMaxcache'
//lib/libmfhdf.so: undefined reference to `Hsetlength'
//lib/libmfhdf.so: undefined reference to `error_top'
//lib/libmfhdf.so: undefined reference to `Hputelement'
//lib/libmfhdf.so: undefined reference to `HPregister_term_func'
//lib/libmfhdf.so: undefined reference to `Hendaccess'
//lib/libmfhdf.so: undefined reference to `VSQueryref'
//lib/libmfhdf.so: undefined reference to `VSgetclass'
//lib/libmfhdf.so: undefined reference to `ANfileinfo'
Thank you for your time,
Jack
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5