From: Andrei Melnikov (andy.melnikov_at_[hidden])
Date: 2006-06-01 15:38:24
On 01/06/06, Reece Dunn <msclrhd_at_[hidden]> wrote:
> Andrey Melnikov wrote:
> >I invoke bjam from MCVC 2005 using a makefile project. When I get
> >compilation errors, they are parsed ok and added to Errors pane, but
> >I'm unable to click the errors and navigate to exact line of code.
> >I have sln and vcproj files in other directory than my Jamroot (in
> >"vc" subdirectory):
> >When I invoke bjam, I have to change current directory from
> >project/vc/ to project/ first, so bjam can find Jamroot.
> This is probably a stupid question, but why don't you have the
> Jamroot file in the vc directory? And shouldn't it be Jamfile
I did just as documented at
> >And when
> >cl.exe is invoked, it writes the following command:
> >main.cpp(7) : warning C4101: 'r' : unreferenced local variable
> >When I click this line, vc opens project/vc/main.cpp instead of
> >project/main.cpp because it thinks that paths in output messages are
> >relative to the folder where vcproj is located.
> >What is the best way to fix this?
> Move the Jam[root|file] into the same directory as the vcproj file!
I think Bojan's solution just to add .. is slightly better, because
the project root is indeed at .., and not where sln/vcproj are
located. The whole vc folder just enables convenient work in the IDE,
and strictly saying it isn't a part of project's source tree, so
people on Linux won't be forced to look there if they build the
project with gcc.
> Alternatively, you could try adding "../main.cpp" into the vcproj
> file as one of the supplementary files.
I did, but it doesn't work. VC still tries to open vc/main.cpp. I
checked this by putting an additional dummy main.cpp in vc.
> >I think this confusion would be fixed if I could invoke bjam from
> >project/vc current folder and pass it Jamroot location explicitly. Is
> >this possible?
> Not as far as I know. It is possible to do it the other way around,
> and get the Jamroot in project/ to use the main.cpp in vc/:
> exe hi : vc/main.cpp ;
> Then you don't need the main.cpp in the project/ directory :).
Yes, I think this would help, but see above. Putting cross-platform
code in a folder named vc is a bit misleading, isn't it?
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk