problems building with boost filesystem on Solaris 9

here is my make file # Makefile for tpg5webapp CC=g++ CFLAGS = -static -m32 -fPIC -Wall BOOSTINC = -I/export/home/mlacrosse/boost/include/boost-1_38 STATIC_LIB_OPT = -Wl,"-Bstatic" LINK_OPTS = -v -fident -Wl,"-Bdirect" -Wl,"-m" -z defs -z rescan BOOST_LIBPATH = -L/export/home/mlacrosse/boost/lib/ -lboost_filesystem-gcc34-mt -lboost_system-gcc34-mt BOOST_LIBS = $(STATIC_LIB_OPT) $(BOOST_LIBPATH) TNLIBS = -L/export/home/jshelly/work/tserve4/lib TNINCLUDE = -I/export/home/jshelly/work/tserve4/pub/include BASE_LIBS= -L/usr/local/lib LOCALLIB = -L/export/home/mlacrosse/work/gccroot/usr/local/lib INCLUDES = -I. -I./h $(BOOSTINC) $(TNINCLUDE) LIBS = $(BOOST_LIBS) $(TNLIBS) $(BASE_LIBS) $(LOCALLIBS) DEFINES = -D__SOLARIS__ -DBSD_COMP -DSTRICT_PROTO -DSSBIGENDIAN all: tpg5webapp tpg5webapp: tpg5webapp.cpp ConfigFile.cpp $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) $(LIBS) \ -o tpg5webapp ConfigFile.cpp tpg5webapp.cpp run: tpg5webapp ./tpg5webapp | tee tpg5webapp.out tidy: @ rm -f *.o clean: tidy @ rm -f tpg5webapp tpg5webapp.out core* here are the error message that I'm getting Undefined first referenced symbol in file boost::filesystem::detail::dir_itr_first(void*&, void*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char>
&, boost::filesystem::file_status&, boost::filesys tem::file_status&)/var/tmp//ccOQOOR8.o boost::system::get_generic_category() /var/tmp//ccOQOOR8.o boost::filesystem::detail::dir_itr_increment(void*&, void*&, std::basic_string<char, std::char_traits<char>, std::allocator<char
&, boost::filesystem::file_status&, boost::filesystem::file_status&)/var/tmp//ccOQOOR8.o boost::system::get_system_category() /var/tmp//ccOQOOR8.o boost::filesystem::detail::not_found_error() /var/tmp//ccOQOOR8.o boost::filesystem::detail::symlink_status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boo st::system::error_code&)/var/tmp//ccOQOOR8.o boost::filesystem::detail::remove_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)/var/tmp//cc OQOOR8.o boost::filesystem::detail::create_directory_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)/v ar/tmp//ccOQOOR8.o boost::filesystem::detail::dir_itr_close(void*&, void*&)/var/tmp//ccOQOOR8.o boost::filesystem::detail::copy_file_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::bas ic_string<char, std::char_traits<char>, std::allocator<char> > const&)/var/tmp//ccOQOOR8.o boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::syst em::error_code&)/var/tmp//ccOQOOR8.o boost::filesystem::detail::get_current_path_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)/var/tmp //ccOQOOR8.o ld: fatal: Symbol referencing errors. No output written to tpg5webapp
collect2: ld returned 1 exit status make: *** [tpg5webapp] Error 1

Guy LaCrosse wrote:
here is my make file
BOOSTINC = -I/export/home/mlacrosse/boost/include/boost-1_38 BOOST_LIBPATH = ... -lboost_filesystem-gcc34-mt
You have boost version mismatch, I think. - Volodya

The gcc34 libraries are the result of building boost 1.38 on Solaris 9. On Thu, Feb 26, 2009 at 9:29 AM, Vladimir Prus <vladimir@codesourcery.com>wrote:
Guy LaCrosse wrote:
here is my make file
BOOSTINC = -I/export/home/mlacrosse/boost/include/boost-1_38 BOOST_LIBPATH = ... -lboost_filesystem-gcc34-mt
You have boost version mismatch, I think.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

This are all the binaries that were built for the boost library I'm using. libboost_filesystem-gcc34-mt-1_38.a libboost_filesystem-gcc34-mt-1_38.so libboost_filesystem-gcc34-mt-1_38.so.1.38.0 libboost_filesystem-gcc34-mt.a libboost_filesystem-gcc34-mt.so libboost_system-gcc34-mt-1_38.a libboost_system-gcc34-mt-1_38.so libboost_system-gcc34-mt-1_38.so.1.38.0 libboost_system-gcc34-mt.a libboost_system-gcc34-mt.so On Thu, Feb 26, 2009 at 9:35 AM, Guy LaCrosse <mlacrosse3@gmail.com> wrote:
The gcc34 libraries are the result of building boost 1.38 on Solaris 9.
On Thu, Feb 26, 2009 at 9:29 AM, Vladimir Prus <vladimir@codesourcery.com>wrote:
Guy LaCrosse wrote:
here is my make file
BOOSTINC = -I/export/home/mlacrosse/boost/include/boost-1_38 BOOST_LIBPATH = ... -lboost_filesystem-gcc34-mt
You have boost version mismatch, I think.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Guy LaCrosse wrote:
The gcc34 libraries are the result of building boost 1.38 on Solaris 9.
Ok, I'm blind. Let's try again:
STATIC_LIB_OPT = -Wl,"-Bstatic" BOOST_LIBPATH = -L/export/home/mlacrosse/boost/lib/ -lboost_filesystem-gcc34-mt -lboost_system-gcc34-mt LIBS = $(BOOST_LIBS) $(TNLIBS) $(BASE_LIBS) $(LOCALLIBS) tpg5webapp: tpg5webapp.cpp ConfigFile.cpp $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) $(LIBS) \ -o tpg5webapp ConfigFile.cpp tpg5webapp.cpp
For static linking to work, the -l option must be present *after* the .cpp. - Volodya

Ah, I see. Thanks. On Thu, Feb 26, 2009 at 9:55 AM, Vladimir Prus <vladimir@codesourcery.com>wrote:
Guy LaCrosse wrote:
The gcc34 libraries are the result of building boost 1.38 on Solaris 9.
Ok, I'm blind. Let's try again:
STATIC_LIB_OPT = -Wl,"-Bstatic" BOOST_LIBPATH = -L/export/home/mlacrosse/boost/lib/ -lboost_filesystem-gcc34-mt -lboost_system-gcc34-mt LIBS = $(BOOST_LIBS) $(TNLIBS) $(BASE_LIBS) $(LOCALLIBS) tpg5webapp: tpg5webapp.cpp ConfigFile.cpp $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) $(LIBS) \ -o tpg5webapp ConfigFile.cpp tpg5webapp.cpp
For static linking to work, the -l option must be present *after* the .cpp.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Guy LaCrosse
-
Vladimir Prus