LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2006, 01:07 AM   #1
tmchardy
Member
 
Registered: Dec 2005
Distribution: Fedora Core
Posts: 55

Rep: Reputation: 15
Kdevelop saying I can't compile C++ programs


I'm new to the Linux developing area and am starting out small... getting that hello world app to run. And I can't even get that far.

When I try to compile a KDE/C++ hello world sample in KDevelop I get an error message saying that I my environment can't compile a simple C++ program. I know this isn't true as I can do the ./configure; make steps for programs that I've downloaded. I've also checked that I have all the appropriate gcc, etc, libraries installed (well all that I know about or I wouldn't be posting here asking what I'm missing ;-) )

The only thing I can think of is it being the bloomin' 64-bit environment biting me in the arse again. Has anyone gotten Kdevelop working in a 64-bit installation or have a clue as to why it would be giving me such an erroneous error.

Error:
Check config.log for details - if you're using a Linux distribution you might miss
a package named similiar to libstd++-dev.

(I have something called libstdc++-devel installed - is this what it's looking for or am I truely missing something)

Fedora Core 4 x64
 
Old 02-16-2006, 04:36 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
what did config.log say?
 
Old 02-16-2006, 04:51 AM   #3
shydra
Member
 
Registered: Nov 2005
Posts: 31

Rep: Reputation: 15
That's it on which distribution?
 
Old 02-16-2006, 07:59 AM   #4
cigarstub
Member
 
Registered: Sep 2005
Posts: 145

Rep: Reputation: 15
tell me if this work:
#include <"the lib" >
m
"write"("how can I have");ain ()
{
}

replace " " w/ the function that u have on ur box, there's a million of function 4 1 purpose , C is a mess.
just browse /lib to see ny fuction header that has out put capacity try this : find / --"in the content "=="print a string to screen"
if u find then just copy it to the dir of source code, n do:
gcc myp -o myp
 
Old 02-16-2006, 08:09 AM   #5
shydra
Member
 
Registered: Nov 2005
Posts: 31

Rep: Reputation: 15
I don't know for above example but this code have to work:

#include <iostream.h>

int main (){
int a;
a = 10;
}

You can check the GCC search path and check the folders for available headers.
Or you can check available libs by this command : whereis stdlib.
You can try with other libraries like iostream, etc. . .
 
Old 02-16-2006, 03:48 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It looks that gcc is run with incorrect parameters. In the project options check the highest verbosity option, so it prints the commands exactly as they're run. You should be able to find out what's wrong. If not, post the messages you get.
 
Old 03-08-2006, 08:45 PM   #7
tmchardy
Member
 
Registered: Dec 2005
Distribution: Fedora Core
Posts: 55

Original Poster
Rep: Reputation: 15
OK, took me forever to find how to set a verbose option (as I said, I'm new at this), but it helped. I've now clearly identified that my error is due to running on an x86_64 machine. I have tons of error about files not existing. Take for example:

"c++config.h"

Nice simple file that should always be there right? Well, in my config it's failing because it's looking for it at /usr/include/c++/4.0.2/bits/c++config.h

However, it's not there. But when I do a search on my system I find it under the following:
/usr/include/c++/4.0.2/bits/i386-redhat-linux/bits/c++config.h

So, I have one of two options - neither of which I know how to do (because this has gotten into the "so over my head" range).

1) Either I need to set the config options to compile this as a 32-bit app (and I have no problem with this option if someone can tell me how to do it)

or

2) I need to get these files into the location that they're supposed to be in (i.e. some sort of x86_64 package would be required?). From what I can see (and I may be off on this) this is supposed included with the libstdc++-4.0.x.x86_64.rpm package that I do have installed (yes, I also have the 32-bit package installed). So I have to assume that the 64-bit files aren't quite up-to-snuff yet? I'm getting used to typing "kernel32" in front of every app that I launch.

So is there any advice now that I've narrowed the problem down a bit? If the two locations are compatible I could always do a link.
 
  


Reply



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
Moving compiled kdevelop programs? garymayor Programming 1 06-28-2005 04:03 AM
kdevelop compile problems Phalloides Linux - Software 0 01-22-2005 09:04 AM
kdevelop doesn't run the programs I compile frogbert Linux - Software 2 12-10-2004 04:02 PM
kdevelop can't run programs foustware Linux - Software 0 08-17-2004 12:41 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:58 AM.

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