Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem building boost on Windows
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2009-12-09 11:13:11


> From: watanabesj_at_[hidden]
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Problem building boost on Windows
>
> Nathan Ridge wrote:
>> I'm having some trouble building the Boost libraries on Windows.
>>
>> <snip>
>>
>> So for some reason, it cannot find libs\system\src\error_code.cpp,
>> which is actually located at
>> C:\Dev\Libraries\boost\libs\system\src\error_code.cpp.
>>
>> Am I supposed to somehow specify the exact path where it should
>> be looking? I tried adding the option --build-dir=C:\Dev\Libraries\boost,
>> but I still get the same error.
>>
>> One suspicious thing that I noticed is that without the --build-dir
>> option, the bin.v2 folder that is created is C:\Dev\bin.v2, as opposed
>> to C:\Dev\Libraries\boost\bin.v2 or something like that.
>> Not sure if this is related to my problem or not.
>>
>
> It sounds like it is related.
>
> This is really weird. It sounds like bjam is managing to change
> directories somehow. Can you open tools/build/v2/tools/gcc.jam,
> find the compile.c++ action and add the line
> cd
> before the call to gcc?
>
> You might also see whether building bjam from the source makes
> any difference.
>
> In Christ,
> Steven Watanabe

I figured out the problem. Once upon a time, I used the
hack described here http://windowsxp.mvps.org/autoruncmd.htm
to get the Command Prompt to always start in C:\Dev
because I was fed up with it always starting in C:\Windows\system32
and having to navigate away from there.
 
Basically, the hack involves setting a registry key to get cmd to
always execute "cd C:\Dev" on startup. The problem is, "always"
really does mean "always", not just "when I start cmd from the GUI".
At some point, bjam must have invoked cmd to run a batch script,
which is when the unexpected directory change to C:\Dev happened.
 
The website did caution that using this hack might affect the
functionality of batch scripts, but at the time I ignored that.
Now it came to bite me in the back...
 
One more small thing: MinGW didn't recognize the .lib files produced
by bjam. Simply renaming them to .a files worked for me,
but I just wanted to make sure this is not another hack
that hides some underlying problem and will bite me later.
 
Thanks,
Nate.
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://go.microsoft.com/?linkid=9691817


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