Boost logo

Boost :

Subject: Re: [boost] [filesystem] home_directory_path
From: Ulrich Eckhardt (doomster_at_[hidden])
Date: 2010-10-21 16:37:16

On Monday 18 October 2010 16:58:31 Jeff Flinn wrote:
> Windows NT and above have the "USERPROFILE" environment variable. Using
> this would be the easiest to use. But I've seen discussion that this may
> not always be properly defined, in particular if the user has reset
> their home directory to a non-system drive. I haven't tracked down it's
> availability on WinCE. Does anyone have experience with this platform?

MS Windows CE doesn't have environment variables at all.

> There is the windows GetUserProfileDirectory api function also available
> since NT4. This is in the Userenv.lib/dll, obviously adding a link
> dependancy.

Concerning CE, I don't think this will work there. The point is that CE is
essentially a single-user system. There is an equivalent though, for the
user's files.

> How are these sorts of system link dependencies handled?
> Through bjam? Or is it acceptable/better to use #pragma
> comment(lib,"Userenv.lib")?

Using that #pragma is not portable, otherwise I would prefer it.


Boost list run by bdawes at, gregod at, cpdaniel at, john at