henjo / libpsf

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

undefined references in libpsf #12

Open hohe opened 9 years ago

hohe commented 9 years ago

I get errors when I try to compile libpsf:

...
libtool: link: g++ -I../include -g -O2 -o .libs/psftest psftest-psftest.o  ./.libs/libpsf.so -Wl,-rpath -Wl,/usr/local/lib
./.libs/libpsf.so: undefined reference to `PropertyBlock::deserialize(char const*)'
./.libs/libpsf.so: undefined reference to `PropertyBlock::find(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const'
./.libs/libpsf.so: undefined reference to `vtable for PropertyBlock'
./.libs/libpsf.so: undefined reference to `PropertyBlock::hasprop(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const'
./.libs/libpsf.so: undefined reference to `PropertyBlock::append_prop(Property const&)'
collect2: ld returned 1 exit status
make[1]: *** [psftest] Fehler 1
make[1]: Leaving directory `/tmp/libpsf/src'
make: *** [all-recursive] Fehler 1

With git bisect I figured out, that the error occurs only with the newest revision.

taimurrabuske commented 9 years ago

I confirm the problem in RedHat EL 7.0.

Pepitokater commented 9 years ago

Have the same on OpenSuse 13.1 was able to compile if I add depcomp to line 86 in Makefile

COPYING config.guess config.sub depcomp install-sh missing \
ltmain.sh
Pepitokater commented 9 years ago

think my previous is not correct, solution is here: File: src/Makefile.am lib_LTLIBRARIES = libpsf.la

bin_PROGRAMS = psftest psftest_SOURCES = psftest.cc psftest_CXXFLAGS = -I../include ${BOOST_CPPFLAGS} 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 psfpropertyblock.cc

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

psfpropertyblock.cc was not in the list