Running individual source codes...
Amit Upadhyay
upadhyay at me.iitb.ac.in
Sat Nov 29 18:51:04 GMT 2003
On Sat, 29 Nov 2003, Matthias Bach wrote:
~ Am Samstag, 29. November 2003 09:25 schrieb WiggTekMicro Corp:
~ > I just figured out that I am not able to run individually written source
~ > pages while inside the of a project. [..]
~
~ This is not a solution to your problem, but a similar one. Is it possible to
~ declare multiple main-Methods inside one Project (using KDevelop 2.1.5). In
~ my experience gcc will still compile the sources, but KDevlop tries to link
~ everything into one programm and ends in the following error:
~
~ /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor
~ -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings
If that is the only problem you can try putting mains surrounded by
#ifdefs; and then #define in some config.h to compile only the required
main function.
Warning: Pseudo code follows [not tested]:
main.cpp:
---->
#include "config.h"
...
...
#ifdef _MAIN
int main(void){
...
}
#endif
<-----
calss1.cpp:
----->
#include config.h
...
#ifdef _MAIN_CLASS1
int main(void){
...
}
#endif
<----
and so on, finally config.h reading
---->
#define _MAIN
//#define _MAIN_CLASS1
<----
It will still compile everything though.
--
Amit Upadhyay
-
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