LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 11-24-2004, 01:35 AM   #1
tygk
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Rep: Reputation: 0
Kdevelop can't run the Helloworld(in C++,kde) made by itself


how can i do?
(i'm useing mdk10.1official)
 
Old 11-24-2004, 03:40 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Please post detaills of the problem. I guess that this is a dependency issue with the KDE or Qt libraries.
 
Old 11-24-2004, 05:21 AM   #3
tygk
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
the issue are Kdevelop 3.0.4 and Qt Designer 3.3.3 (in MDK 10.1 official)



hi_kde.cpp

#include "hi_kde.h"

#include <qlabel.h>

#include <kmainwindow.h>
#include <klocale.h>

hi_kde::hi_kde()
: KMainWindow( 0, "hi_kde" )
{
// set the shell's ui resource file
setXMLFile("hi_kdeui.rc");

new QLabel( "Hello World", this, "hello label" );
}

hi_kde::~hi_kde()
{
}

#include "hi_kde.moc"



hi_kde.h

#ifndef _HI_KDE_H_
#define _HI_KDE_H_

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <kmainwindow.h>

/**
* @short Application Main Window
* @author a <a@Mdk>
* @version 0.1
*/
class hi_kde : public KMainWindow
{
Q_OBJECT
public:
/**
* Default Constructor
*/
hi_kde();

/**
* Default Destructor
*/
virtual ~hi_kde();
};

#endif // _HI_KDE_H_



main.cpp

#include "hi_kde.h"
#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>

static const char description[] =
I18N_NOOP("A KDE KPart Application");

static const char version[] = "0.1";

static KCmdLineOptions options[] =
{
// { "+[URL]", I18N_NOOP( "Document to open." ), 0 },
KCmdLineLastOption
};

int main(int argc, char **argv)
{
KAboutData about("hi_kde", I18N_NOOP("hi_kde"), version, description,
KAboutData::License_GPL, "(C) 2004 a", 0, 0, "a@Mdk");
about.addAuthor( "a", 0, "a@Mdk" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
KApplication app;
hi_kde *mainWin = 0;

if (app.isRestored())
{
RESTORE(hi_kde);
}
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs:arsedArgs();

/// @todo do something with the command line args here

mainWin = new hi_kde();
app.setMainWidget( mainWin );
mainWin->show();

args->clear();
}

// mainWin has WDestructiveClose flag by default, so it will delete itself.
return app.exec();
}
 
Old 11-24-2004, 06:43 AM   #4
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
He's not asking you to post source code, but rather what happens when you attempt to compile it...
 
Old 11-24-2004, 07:56 AM   #5
tygk
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
cd "/home/a/hi_kde" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -f Makefile.cvs && mkdir "/home/a/hi_kde/debug" && cd "/home/a/hi_kde/debug" && CXXFLAGS="-O0 -g3" "/home/a/hi_kde/configure" --enable-debug=full && cd "/home/a/hi_kde/debug" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k


then, no reply......
 
Old 11-24-2004, 08:43 AM   #6
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
So it's shelling out, but it's not finishing and leaving the shell, right?
 
Old 11-24-2004, 07:17 PM   #7
tygk
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
how should i do?
 
Old 11-25-2004, 02:35 AM   #8
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Do what?

Please answer the above question.
 
Old 11-25-2004, 04:57 AM   #9
tygk
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
but, i wait for one hour, the Kdevelop no any reply
 
Old 11-25-2004, 05:34 AM   #10
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Ok, I can't help you as you do not seem to want to answer questions that may lead to solving your problem...
 
Old 11-25-2004, 06:12 AM   #11
tygk
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by opjose
Ok, I can't help you as you do not seem to want to answer questions that may lead to solving your problem...
what are your questions? i don't know......
 
Old 11-27-2004, 05:27 PM   #12
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Quote:
Originally posted by tygk
cd "/home/a/hi_kde" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -f Makefile.cvs && mkdir "/home/a/hi_kde/debug" && cd "/home/a/hi_kde/debug" && CXXFLAGS="-O0 -g3" "/home/a/hi_kde/configure" --enable-debug=full && cd "/home/a/hi_kde/debug" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k


then, no reply......
What doesn't reply? What do you expect to see, and what actually happens?
 
Old 11-28-2004, 02:06 AM   #13
jchance
Member
 
Registered: Sep 2003
Location: New Hampshire USA
Distribution: Mandriva 2006 & 2007 Power Pack Club
Posts: 178

Rep: Reputation: 30
I have been having the same problem. What it is doing has to do with kdevelop's need to make all the files for a project, makefile, etc. This instead of being able to just compile a simple c++ file, which would be easier. When it goes into making the project files it just farts out and it doesn't even let you know.
 
Old 12-17-2004, 08:17 AM   #14
evrqst123
LQ Newbie
 
Registered: Dec 2004
Distribution: Mandrake
Posts: 1

Rep: Reputation: 0
I had a similar problem and I fixed it by placing my project in a directory path that had no spaces in it.

i.e.
/home/user/myproject/
 
Old 09-13-2005, 10:16 AM   #15
garethbirduk
LQ Newbie
 
Registered: Sep 2005
Posts: 1

Rep: Reputation: 0
I have experience the same problems, but I've not been able to sort it by removing "spaces" from filenames. I tried running a tutorial-type problem called 'Getting Started' which I found here:

KDevelop->Help->About KDevelop
-> http://www.kdevelop.org/
-> http://www.dazzle.plus.com/linux/part01.htm


I created a new project called test, under:
/home/user/test
by clicking:
C++ -> KDE -> Simple KDE Application

All that is produced is a few lines of code:

#include "test.h"

#include <qlabel.h>

#include <kmainwindow.h>
#include <klocale.h>

test::test()
: KMainWindow( 0, "test" )
{
// set the shell's ui resource file
setXMLFile("testui.rc");

new QLabel( "Hello World", this, "hello label" );
}

test::~test()
{
}

#include "test.moc"


Then I used:
Build -> Run automake & friends
...
success

Build -> Run configure
...
success

Build -> Build Project
...
cd "/home/gb/test/debug" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k
*linking test (libtool)
**** Exited with status: 2 ***


I used URMPI to check my autoconf and automakes are up to date - both returned:
Everything is already installed

I am using MDK10.0 Official and KDevelop 3.0.1 on KDE 3.2, apparently with everyting up to date.

But that said, if I create a different simple project called test2, under:
/home/user/test2
by clicking:
C++ -> Simple Hello world program
then everything builds and runs fine with no problems.

Is this a problem with my autoconf and automake? Any help would be greatly appreciated - but please remember, this is only my 2nd day of using Linux, so please keep it simple for me!

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kdevelop fails to run any programs dinolinux Linux - Software 0 07-21-2005 06:17 AM
kdevelop can't run programs foustware Linux - Software 0 08-17-2004 12:41 PM
I can run programs made and compilated by me sdr_ar Fedora 2 07-09-2004 09:29 PM
kdevelop compiles but won't run. exodist Linux - Software 0 03-28-2004 07:31 PM
how can i run my helloworld servlet in apache-tomcat-mod_jk? doublefailure Linux - Software 1 04-28-2003 08:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 09:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration