After spending a lot of time writing code in other languages,
returning to C++ and starting a new project has been painful. It seems
in order to get anything done you need to #include, add linker
parameters, create a makefile, and update that makefile everytime you
add new files. I realize that _sometimes_ you want to #include a
header but potentially link against different object files, but for me
and I think most people making desktop applications that's pretty
rare. What I'd like to do is something like:
#include <SDL/sdl.h>
And my linker flags would be automatically updated to link SDL.
Additionally, my project would be a single folder, and any *.cpp files
I had inside or in subfolders would just get compiled when I typed
"make," without me having to write any sort of "Makefile" whatsoever.
I don't need anymore flexibility in my build system. I just want
linker flags to be inferred and for my makefile to automatically
update for new files, without having to commit to a bloated IDE (I
like emacs).
Are there any tools like this?
Thanks
Joe 7 1544
dataangel wrote:
After spending a lot of time writing code in other languages,
returning to C++ and starting a new project has been painful. It seems
in order to get anything done you need to #include, add linker
parameters, create a makefile, and update that makefile everytime you
add new files. I realize that _sometimes_ you want to #include a
header but potentially link against different object files, but for me
and I think most people making desktop applications that's pretty
rare. What I'd like to do is something like:
#include <SDL/sdl.h>
And my linker flags would be automatically updated to link SDL.
Additionally, my project would be a single folder, and any *.cpp files
I had inside or in subfolders would just get compiled when I typed
"make," without me having to write any sort of "Makefile" whatsoever.
I don't need anymore flexibility in my build system. I just want
linker flags to be inferred and for my makefile to automatically
update for new files, without having to commit to a bloated IDE (I
like emacs).
You only have to set these things up once, probably in less time that it
took to compose this message! That's the purpose of tools like Make and
Ant.
--
Ian Collins.
It's still a pain over other languages, and I'm still going to have to
update the Makefile every time I decide to split code into another
file, which happens a lot at the beginning of a project. We're
programmers, we're lazy and like efficient solutions ;)
On Jun 9, 7:48 pm, Ian Collins <ian-n...@hotmail.comwrote:
dataangel wrote:
After spending a lot of time writing code in other languages,
returning to C++ and starting a new project has been painful. It seems
in order to get anything done you need to #include, add linker
parameters, create a makefile, and update that makefile everytime you
add new files. I realize that _sometimes_ you want to #include a
header but potentially link against different object files, but for me
and I think most people making desktop applications that's pretty
rare. What I'd like to do is something like:
#include <SDL/sdl.h>
And my linker flags would be automatically updated to link SDL.
Additionally, my project would be a single folder, and any *.cpp files
I had inside or in subfolders would just get compiled when I typed
"make," without me having to write any sort of "Makefile" whatsoever.
I don't need anymore flexibility in my build system. I just want
linker flags to be inferred and for my makefile to automatically
update for new files, without having to commit to a bloated IDE (I
like emacs).
You only have to set these things up once, probably in less time that it
took to compose this message! That's the purpose of tools like Make and
Ant.
--
Ian Collins.
dataangel wrote:
Please don't top-post...
On Jun 9, 7:48 pm, Ian Collins <ian-n...@hotmail.comwrote:
>dataangel wrote:
>>After spending a lot of time writing code in other languages, returning to C++ and starting a new project has been painful. It seems in order to get anything done you need to #include, add linker parameters, create a makefile, and update that makefile everytime you add new files. I realize that _sometimes_ you want to #include a header but potentially link against different object files, but for me and I think most people making desktop applications that's pretty rare. What I'd like to do is something like: #include <SDL/sdl.h> And my linker flags would be automatically updated to link SDL. Additionally, my project would be a single folder, and any *.cpp files I had inside or in subfolders would just get compiled when I typed "make," without me having to write any sort of "Makefile" whatsoever. I don't need anymore flexibility in my build system. I just want linker flags to be inferred and for my makefile to automatically update for new files, without having to commit to a bloated IDE (I like emacs).
You only have to set these things up once, probably in less time that it took to compose this message! That's the purpose of tools like Make and Ant.
It's still a pain over other languages, and I'm still going to have to
update the Makefile every time I decide to split code into another
file, which happens a lot at the beginning of a project. We're
programmers, we're lazy and like efficient solutions ;)
That's why they give us IDEs...
Joking aside, refactoring a makefile or build script is just part of the
development process. It's the price we pay for flexibility and the lack
of dependence on an interpreter/VM the knows where to find things.
--
Ian Collins.
dataangel wrote:
....
Are there any tools like this?
MakeXS does somthing like this but it's not perfect.
At the moment MakeXS uses GNU make and m4. The idea behind MakeXS is
that simply putting a .cpp file in an appropriate directory will make
the Right™ things happen.
It also automatically works our the root of the tree, the include
directories, libs etc etc. You can go to any directory and type "make"
and everything in that folder and below is built. It supports "release"
and "debug" (work) builds - bulding of unit tests, running of unit
tests, 64 bit vs 32 bit builds, doxygen builds and easily allows
environment variable overrides or even developer specific configuration.
The latest version can be found with the Austria C++ "alpha". http://netcabletv.org/public_releases/
I don't know how well other tools like cmake, Jam etc work. I used
cmake on one project and I was not totally happy with its win32 support.
Although MakeXS requires cygwin so it's not much better.
The learning curve is steep but short.
Ian Collins wrote:
....
Joking aside, refactoring a makefile or build script is just part of the
development process. It's the price we pay for flexibility and the lack
of dependence on an interpreter/VM the knows where to find things.
make is the assembler of build tools. you can build an awful lot on top
of make that reduces the maintenance of trivial things like the OP is
alluding to.
MakeXS does alot with GNU make but much more can be done to eliminate
virtually all trivial work.
dataangel wrote:
After spending a lot of time writing code in other languages,
returning to C++ and starting a new project has been painful. It seems
in order to get anything done you need to #include, add linker
parameters, create a makefile, and update that makefile everytime you
add new files. I realize that _sometimes_ you want to #include a
header but potentially link against different object files, but for me
and I think most people making desktop applications that's pretty
rare. What I'd like to do is something like:
#include <SDL/sdl.h>
And my linker flags would be automatically updated to link SDL.
Additionally, my project would be a single folder, and any *.cpp files
I had inside or in subfolders would just get compiled when I typed
"make," without me having to write any sort of "Makefile" whatsoever.
I don't need anymore flexibility in my build system. I just want
linker flags to be inferred and for my makefile to automatically
update for new files, without having to commit to a bloated IDE (I
like emacs).
Are there any tools like this?
What you can do, at least for the cpp-stuff, is to direct your Makefile
to use *any* cpp files inside your source-tree:
CPPs = $(shell find . -name \*.cpp)
Yours,
Daniel
--
Got two Dear-Daniel-Instant Messages
by MSN, associate ICQ with stress --
so please use good, old E-MAIL!
On 2007-06-10 11:25, Daniel Kraft wrote:
dataangel wrote:
>After spending a lot of time writing code in other languages, returning to C++ and starting a new project has been painful. It seems in order to get anything done you need to #include, add linker parameters, create a makefile, and update that makefile everytime you add new files. I realize that _sometimes_ you want to #include a header but potentially link against different object files, but for me and I think most people making desktop applications that's pretty rare. What I'd like to do is something like:
#include <SDL/sdl.h>
And my linker flags would be automatically updated to link SDL. Additionally, my project would be a single folder, and any *.cpp files I had inside or in subfolders would just get compiled when I typed "make," without me having to write any sort of "Makefile" whatsoever. I don't need anymore flexibility in my build system. I just want linker flags to be inferred and for my makefile to automatically update for new files, without having to commit to a bloated IDE (I like emacs).
Are there any tools like this?
What you can do, at least for the cpp-stuff, is to direct your Makefile
to use *any* cpp files inside your source-tree:
CPPs = $(shell find . -name \*.cpp)
For smaller projects a makefile might not even be necessary, just doing
'g++ -o myapp *.cpp' might work. And as others have pointed out, if you
use an IDE there might be tools to automatically build the program for
you, either by generating a makefile or by not using one at all.
--
Erik Wikström This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ralf W. Grosse-Kunstleve |
last post by:
******************************************************************************
This posting is also available in HTML format:
http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html...
|
by: Shaul Dar |
last post by:
When starting a (1st) .NET application the CLR seems to allocate a
very large (100s of MB, continuous AFAIK) virtual memory, as evident
by the process VM size of even a toy app. The CLR also seems...
|
by: Stuart MacMartin |
last post by:
Looking for tricks for speeding up builds...
We have an application with about 970 of our own classes of various
sizes plus a fair number of routines. Over the past year the
compile/link time...
|
by: jbm05 |
last post by:
Hi,
I'm curious about the computational complexity of a query I have. The
query contains multiple nested self left joins, starting with a simple
select, then doing a self left join with the...
|
by: RL Stevenson |
last post by:
What is a reasonable way to manage a complex form with 5 or so tabs with 100
or more controls bound to 5-10 tables in a database?
Pasting all those controls, datasets, data adapters directly onto...
| |
by: foldface |
last post by:
Hi
Anyone got any general tips on reducing complexity on 'bigish'
pages?
I'm thinking here of a page with a number of usercontrols, all posting
back,
dynamic controls being added, having...
|
by: Slawek |
last post by:
Hi,
I know that this is one of the topics that are most popular but I just have
to ask.
Can anyone give me some links, info etc about following question:
- how to reduce code dependencies
-...
|
by: raghu |
last post by:
How to find the complexity of a C program? Can anyone explain it with
an example...
Thanks a lot.
|
by: Gilles Ganault |
last post by:
Hello,
I'm no LAMP expert, and a friend of mine is running a site which is a
bit overloaded. Before upgrading, he'd like to make sure there's no
easy way to improve efficiency.
A couple of...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |