List Info

Thread: is there an easy way to simply compile a .cpp file?




is there an easy way to simply compile a .cpp file?
country flaguser name
Denmark
2007-08-28 09:49:16
Hi all,

Often I only want to compile a single .cpp file I'm working
on.
Thus I could add a Jamfile with an obj target for each .cpp
file in my 
project. This seems a bit anoying. Is there a way to auto
generate a 
target (perhaps having the same name as the .cpp file
without it's 
extension)?

Thanks in advance

-Thorsten
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: is there an easy way to simply compile a .cpp file?
user name
2007-08-28 09:56:36
Thorsten Ottosen wrote, on 8/28/2007 10:49 AM:
> Hi all,
>
> Often I only want to compile a single .cpp file I'm
working on.
> Thus I could add a Jamfile with an obj target for each
.cpp file in my 
> project. This seems a bit anoying. Is there a way to
auto generate a 
> target (perhaps having the same name as the .cpp file
without it's 
> extension)?
>
> Thanks in advance
>
> -Thorsten
You can tell it to generate the object file directly by
doing "bjam 
foo.o" on Unix or "bjam foo.obj" on Windows
(or whatever the extension 
for object files is on your system).  Assuming you have a
foo.cpp, it 
will build it.  You'll get something like this:

notice: could not find main target  foo.obj
notice: assuming it's a name of file to create

Phillip
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )