Running individual source codes...
Ian Wadham
ianw at netspace.net.au
Sat Nov 29 23:32:22 GMT 2003
All programs in a UNIX/Linux environment must start with a main()
program. That is part of the architecture. The idea is that, using the
(optional) argv and argc parameters of main(), any program can receive
and process command-line parameters and can be run as a command
in a script or a pipe or just standalone. Powerful stuff.
You -can- do menu item Build->Compile File in KDevelop to compile
one source file (AFAIK), but I never use it. If you do Build->Build
Project, files that have not changed do not get re-compiled, unless
you have changed something that they depend upon. That is a -really-
useful feature in a large project! Also AFAIK there is no support
for Build->Execute with automated re-compiling. In large "real"
applications that could be quite dangerous IMHO (and experience).
For the rest, RTFM (ask your tutor what that means), see KDevelop
Handbook (under Help), Chapter 12 (the number may have changed),
"Building and Project Management", "Automake Manager". It is
quite possible to build several executables with different main
programs and different filenames, but each one has to declare
"main" somewhere. You can just create a new "target" in your "src"
sub-project for each "main" and its callees - or you can have
different executable sub-projects or even different projects.
BTW, don't go too far with this. You will probably find that you
have to submit your assignments in a Windows or DOS environment.
Object libraries like Qt and KDE are free in Linux, but Qt costs
big dollars in Windows and would probably not be available at
your place of learning. If you don't like KDevelop anyway, rush
out and spend a few hundred bucks on Visual C++! I refuse to.
That's why I am here - as well as it being more fun ... :-)
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list