Boost logo

Boost Users :

From: Paul (elegant_dice_at_[hidden])
Date: 2005-01-19 04:46:13


Hi,

I'm having killer problems with the filesystem library.

I'm compiling it with bjam "-sTOOLS=mingw", which seems to work just
fine. All the tests pass etc.

Then I wrote this simple program:
#include <boost/filesystem/path.hpp>
#include <iostream>
using namespace std;
using namespace boost::filesystem;

int main()
{
  try {
    path p("c:",native);
  }
  catch (exception & e) {
    cerr << "Error: " << e.what() << endl;
    return 1;
  }
  cerr << "Ok" << endl;
  return 0;
}

and compiled it with the Makefile:
test: test.cpp Makefile
        g++ -g -I../boost/boost-compiled -I. -Wall -c test.cpp
        g++ -g -Wl,-enable-stdcall-fixup -Wl,-subsystem,console -Wall -o
test.exe test.o libboost_filesystem-mgw-d-1_32.lib
        g++ -g -Wl,-enable-stdcall-fixup -Wl,-subsystem,console -Wall -o
test-dll.exe test.o -L. -lboost_filesystem-mgw-d-1_3

(adjust for your paths, I copied the dlls and libs into the local dir
Just To Be Sure).

The output of running the two programs is as follows:
paul_at_xyz ~/test
$ ./test
Ok

paul_at_xyz ~/test
$ ./test-dll.exe
Error: boost::filesystem::path: invalid name "c:" in path: "c:"

Why does it behave differently depending on the linkage? If I must use
a .lib, what if it needs to be used in multiple .dlls of mine? Help?

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