Boost logo

Boost Users :

From: Paul (elegant_dice_at_[hidden])
Date: 2005-01-20 01:12:50


I looked deeper into the problem, and hacked up boost a little to find
out that the problem is the following check:

       if ( (checker == no_check || checker == native) && src.size() >= 2 )
at path_posix_windows.cpp:243

specifically checker==native.

I had constructed path with boost::filesystem::native, but when I hacked
it up to do the following:

# ifdef BOOST_WINDOWS
       std::stringstream ss; ss << "checker=" <<
reinterpret_cast<unsigned long>(checker) << std::endl
              << "native=" << reinterpret_cast<unsigned long>(native) << std::endl;
       boost::throw_exception( filesystem_error(
        "boost::filesystem::path",
        ss.str() ));

       if ( (checker == no_check || checker == native) && src.size() >= 2 )

I got the following results from calling the line:
boost::filesystem::path p(s,boost::filesystem::native);

linking to libboost_filesystem-mgw-d-1_32.lib:
checker=4201048 native=4201048

linking to boost_filesystem-mgw-d-1_32.dll:
checker=4263776 native=1649966248

so, it appears that testing the checker using the address of a function
is unreliable in a DLL context? Have I compiled my program/library
incorrectly? I am not too familiar with DLL details etc, can someone
else please shed some light on this?

thanks,
Paul


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net