henjo / libpsf

PSF simulation data c++ library
GNU Lesser General Public License v3.0
26 stars 23 forks source link

unable to make test program on OpenSuse 13.1 #15

Open Pepitokater opened 9 years ago

Pepitokater commented 9 years ago

I'm trying to build the test program, up to now it compiles but unable to link it together: drwxrwxr-x 2 ln icusers 4096 29. Nov 2014 data -rw-rw-r-- 1 ln icusers 22480 29. Jun 12:10 Makefile -rw-rw-r-- 1 ln icusers 234 29. Nov 2014 Makefile.am -rw-rw-r-- 1 ln icusers 22583 29. Jun 12:10 Makefile.in -rw-rw-r-- 1 ln icusers 5238 29. Nov 2014 test_psfdataset.cc -rw-rw-r-- 1 ln icusers 1473504 29. Jun 12:17 test_psfdataset-test_psfdataset.o

local ln@entwnbln:~/Programme/PSF_Interface/libpsf-master/test> make /bin/sh ../libtool --tag=CXX --mode=link g++ -I../include -I/usr/include -g -O2 -L../src -lpsf -lcppunit -ldl -o test_psfdataset test_psfdataset-test_psfdataset.o
libtool: link: g++ -I../include -I/usr/include -g -O2 -o .libs/test_psfdataset test_psfdataset-test_psfdataset.o -L../src /icpers/ln/home/Programme/PSF_Interface/libpsf-master/src/.libs/libpsf.so /usr/lib64/libcppunit.so -ldl -Wl,-rpath -Wl,/usr/lib64 /icpers/ln/home/Programme/PSF_Interface/libpsf-master/src/.libs/libpsf.so: undefined reference to PropertyBlock::deserialize(char const*)' /icpers/ln/home/Programme/PSF_Interface/libpsf-master/src/.libs/libpsf.so: undefined reference toPropertyBlock::find(std::string) const' /icpers/ln/home/Programme/PSF_Interface/libpsf-master/src/.libs/libpsf.so: undefined reference to vtable for PropertyBlock' /icpers/ln/home/Programme/PSF_Interface/libpsf-master/src/.libs/libpsf.so: undefined reference toPropertyBlock::hasprop(std::string) const' /icpers/ln/home/Programme/PSF_Interface/libpsf-master/src/.libs/libpsf.so: undefined reference to `PropertyBlock::append_prop(Property const&)' collect2: error: ld returned 1 exit status make: *\ [test_psfdataset] Fehler 1

posgnach commented 7 years ago

Had the same problem. Solved with this patch

diff --git a/src/Makefile.am b/src/Makefile.am
index 95f5ea1..9ad2e4b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,7 +8,7 @@ psftest_LDFLAGS = libpsf.la
 libpsf_la_SOURCES = psf.cc psfdata.cc psfproperty.cc psfchunk.cc \
        psfcontainer.cc psfindexedcontainer.cc psfgroup.cc psffile.cc \
        psftype.cc psfstruct.cc psfsections.cc psftrace.cc \
-       psfnonsweepvalue.cc psfsweepvalue.cc
+       psfnonsweepvalue.cc psfsweepvalue.cc psfpropertyblock.cc

 libpsf_la_CXXFLAGS = \
        -I../include ${BOOST_CPPFLAGS}