[FWTools] Probably did something stupid...
Frank Warmerdam
warmerdam at pobox.com
Wed Jul 25 16:38:10 EDT 2007
Mike Toothaker wrote:
> Thanks for your quick response, but for some reason I don't seem to be
> able to get the LD_LIBRARY_PATH thing to work. I am using bash on
> Fedora 7, g++ v4.1.1, FWTools-linux-1.3.4.tar.gz.
>
> Here is my make file:
>
> CC = g++
> CMBN = cmilcordbn
> SMILE = /root/Desktop/smile
> FWLIB = /root/FWTools/lib
> FWINC = /root/FWTools/include
>
> test: milcordbn.o milcordsmilebn.o test.o
> $(CC) -o test -L$(FWLIB) test.o \
> milcordsmilebn.o milcordbn.o \
> $(SMILE)/libsmilearn.a $(SMILE)/libsmilexml.a $(SMILE)/libsmile.a
>
> test.o: test.cpp
> $(CC) -c test.cpp -I$(CMBN) -I$(SMILE) -o test.o
>
> milcordsmilebn.o: $(CMBN)/MilcordSmileBN.cpp $(CMBN)/MilcordSmileBN.cpp
> milcordbn.o
> $(CC) -c $(CMBN)/MilcordSmileBN.cpp -I$(SMILE) -I$(CMBN) -o
> milcordsmilebn.o
>
> milcordbn.o: $(CMBN)/MilcordBN.cpp $(CMBN)/MilcordBN.h
> $(CC) -c $(CMBN)/MilcordBN.cpp -o milcordbn.o
>
> clean:
> rm -rf *.o
> rm -f test
>
> Here is a smathering of the errors I get:
>
> /root/Desktop/smile/libsmilearn.a(dataset.o): In function
> `MapIndex(std::map<std::basic_string<cha
> r, std::char_traits<char>, std::allocator<char> >, int,
> std::less<std::basic_string<char, std::cha
> r_traits<char>, std::allocator<char> > >,
> std::allocator<std::pair<std::basic_string<char, std::ch
> ar_traits<char>, std::allocator<char> > const, int> > >&, char const*)':
> dataset.cxx:(.text+0x912): undefined reference to
> `std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::_Rep::_S_empty_rep_storage'
> dataset.cxx:(.text+0x954): undefined reference to
> `__gnu_cxx::__exchange_and_add(int volatile*, in
> t)'
> dataset.cxx:(.text+0x97d): undefined reference to
> `__gnu_cxx::__exchange_and_add(int volatile*, in
> t)'
>
> I know that the errors do not refer to gdal or any of the FWTools
> libraries, etc. so you might say "Well it is something wrong with smile,
Mike,
I believe the problem is that different versions of gcc were used for
smile (and your local builds) and the c++ code in FWTools and so there
are c++ support library conflicts.
It might *possibly* help to build smile as a shared library instead
of a static library. Or you might be better off building GDAL, etc
from source.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the FWTools
mailing list