Author Topic: Kdevelop  (Read 2344 times)

Siplus

  • Member
  • **
  • Posts: 522
  • Kudos: 43
    • http://www.siplus.org
Kdevelop
« on: 3 August 2003, 03:19 »
i finally got Kdevelop downloaded and installed, but it doesn't recognise C++ headerfiles like iostream

is iostream just a windows header file, or if it is a universal c++ header, how do i get it and install it so Kdevelop recognises it?

right now i'm stuck with stdlib.h, and the only thing i really know is printf() ....


http://www.siplus.org

"Your computer is already fucked up by having Windows
on it, you can only unfuck it up by installing Linux."
-- void main (old school MES member)


Desktop: Athlon 2600/ 768mb DDR266
--Running: Ubuntu 5.10, FC4, Win2k
 (Also, Unbuntu 6-06:5, 5.04; Fedora Core 5, WinXP, but none of these are used much)
12" Powerbook: 1.5 Ghz G4 PowerPC / 1.25 GB DDR333
--Running: Mac OS X 10.4 Tiger

shuiend

  • Member
  • **
  • Posts: 250
  • Kudos: 0
    • http://stuff4fools.topcities.com
Kdevelop
« Reply #1 on: 3 August 2003, 22:42 »
I would nto recomend kdevolp. i wanted to use it when i first started c++ cause we use visual c++ crap at skool and i wanted it to look similar and such. I never figured out howto get it to work so i just said fuck it and started usin g++. g++ has worked like a charm for me.
you know its a bad day when you look more sober then usual

Faust

  • Member
  • **
  • Posts: 1,223
  • Kudos: 0
Kdevelop
« Reply #2 on: 4 August 2003, 01:37 »
With the added advantage that using a plain vanilla text editor like emacs will *force* you to learn exactly what code does what.
Yesterday it worked
Today it is not working
Windows is like that
 -- http://www.gnu.org/fun/jokes/error-haiku.html

Siplus

  • Member
  • **
  • Posts: 522
  • Kudos: 43
    • http://www.siplus.org
Kdevelop
« Reply #3 on: 7 August 2003, 06:58 »
hmm, well i did try programming w/ vi as a text editor first, but when i tried compiling, it still didn't recognise the iostream header file. (i also don't know how to run the program, i successfully compiled plain C programs (a basic printf("hi") ;)


http://www.siplus.org

"Your computer is already fucked up by having Windows
on it, you can only unfuck it up by installing Linux."
-- void main (old school MES member)


Desktop: Athlon 2600/ 768mb DDR266
--Running: Ubuntu 5.10, FC4, Win2k
 (Also, Unbuntu 6-06:5, 5.04; Fedora Core 5, WinXP, but none of these are used much)
12" Powerbook: 1.5 Ghz G4 PowerPC / 1.25 GB DDR333
--Running: Mac OS X 10.4 Tiger

Faust

  • Member
  • **
  • Posts: 1,223
  • Kudos: 0
Kdevelop
« Reply #4 on: 12 August 2003, 11:38 »
So gcc cli compile doesn't work?
So this isn't just a kdevelop problem?
Have you put the brackets around iostream:
include <iostream>
?
I'm not a fan of C++ as yet so I don't claim expert advice here, but I think the brackets are necessary (search standard locations kinda thing.)  Only omit them if the file you require is in the current directory.  But like I said, I'm not a C++ expert so don't quote me on this.
Yesterday it worked
Today it is not working
Windows is like that
 -- http://www.gnu.org/fun/jokes/error-haiku.html

jtpenrod

  • VIP
  • Member
  • ***
  • Posts: 675
  • Kudos: 105
Kdevelop
« Reply #5 on: 13 August 2003, 12:51 »
quote:
i finally got Kdevelop downloaded and installed, but it doesn't recognise C++ headerfiles like iostream

is iostream just a windows header file, or if it is a universal c++ header, how do i get it and install it so Kdevelop recognises it?

right now i'm stuck with stdlib.h, and the only thing i really know is printf() ....


If all you know is "printf()", then you are ONEHELLUVA long way from worrying about KDevelop! KDevelop is a programming aid for doing graphical apps based on the Qt/KDE libs. In order to write such programs, you will need to understand such things like classes, how inheritance works as you will be deriving daughter classes from the libs, how to code your event handlers, and how to read the source code for those classes contained in the Qt/KDE libs.

Your best bet is to get this free E-Book: Thinking in C++. Study that well until you understand it. It's a very good reference, but you won't just breeze through it. Once that's done, next get: GCC on-line documentation to learn how to use GCC, then: Autobook to learn about the GNU program managing utilities: automake, autoconf, libtool.

That's quite a bit of studying, and would be the minimum. You might also want to hit Amazon.com to check out some other books on Linux programming. (Beginning Linux Programming and Professional Linux Programming are very good, but neither cheap nor small.) Before attempting a graphical app, try programming some command line apps. Then you will be ready to start thinking about KDevelop. (Although I personally don't care for it all that much: I prefer FOX instead.)
_______________________________________
Live Free or Die: Linux

"There: now you'll never have to look at those dirty Windows anymore"
      --Daffy Duck

[ August 13, 2003: Message edited by: jtpenrod ]

Live Free or Die: Linux
If software can be free, why can't dolphins?

Siplus

  • Member
  • **
  • Posts: 522
  • Kudos: 43
    • http://www.siplus.org
Kdevelop
« Reply #6 on: 13 August 2003, 14:21 »
ok, i think you definatly misunderstood me there...

i don't do much with the <stdlib.h> header, and i only know a few functions from it. i mostly use <iostream.h>, and i'm used to cout/cin...

i'm far enough in knowing C++ that i can create and manipulate files, make games, even program in opengl. when i said all i really know is printf(), i was talking about the stdlib header, not just programming.

my problem here, is not the programming knowledge, or lack there of, it is that KDevelop and gcc does not recognise the iostream header file

(of, and i always put the header file in <>, i didn't know you could do it any other way)


http://www.siplus.org

"Your computer is already fucked up by having Windows
on it, you can only unfuck it up by installing Linux."
-- void main (old school MES member)


Desktop: Athlon 2600/ 768mb DDR266
--Running: Ubuntu 5.10, FC4, Win2k
 (Also, Unbuntu 6-06:5, 5.04; Fedora Core 5, WinXP, but none of these are used much)
12" Powerbook: 1.5 Ghz G4 PowerPC / 1.25 GB DDR333
--Running: Mac OS X 10.4 Tiger

jtpenrod

  • VIP
  • Member
  • ***
  • Posts: 675
  • Kudos: 105
Kdevelop
« Reply #7 on: 15 August 2003, 12:51 »
If you're using KDevelop, then why do you need iostream.h? Here's the relevant part of the FOX include file; it's not there.

Code: [Select]

As you can see, FOX doesn't use iostream.h. Also, I grepped through: /usr/lib/qt3/include and also came up blank for iostream.h. Qt doesn't use it either, and I'm sure KDevelop doesn't, as it integrates with Qt and used the Qt libs as well.

It looks like iostream.h is useful for command line apps that interact with standard in & out. Since a graphical app won't use "cout" and "cin" anyway, it's not too useful in that case. The only difficulty with using "#include <iostream.h> that I found is that g++ bitches about "antiquated headers", however, that's just a warning and doesn't prevent a C++ program that uses it from compiling
______________________________________
Live Free or Die: Linux

"There: now you'll never have to look at those dirty Windows anymore"
      --Daffy Duck

[ August 15, 2003: Message edited by: jtpenrod ]

Live Free or Die: Linux
If software can be free, why can't dolphins?

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
Kdevelop
« Reply #8 on: 15 August 2003, 20:07 »
Any decent application, graphical or otherwise, will use standard io to write to the terminal, even if it's just printing a list of options in response to a --help option being passed, or printing the program's version number. And applications should write error messages to stderror.

As you can see FOX uses the C header stdio instead of iostream.
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


Siplus

  • Member
  • **
  • Posts: 522
  • Kudos: 43
    • http://www.siplus.org
Kdevelop
« Reply #9 on: 15 August 2003, 21:10 »
heh, is there any way i can force Kdevelop to use iostream.h?

it is what i'm used to, and i have an entire year of school programs that use iostream.h (from visual studios), and i don't want to have to change iostream to stdlib and all the functions that go with it...


http://www.siplus.org

"Your computer is already fucked up by having Windows
on it, you can only unfuck it up by installing Linux."
-- void main (old school MES member)


Desktop: Athlon 2600/ 768mb DDR266
--Running: Ubuntu 5.10, FC4, Win2k
 (Also, Unbuntu 6-06:5, 5.04; Fedora Core 5, WinXP, but none of these are used much)
12" Powerbook: 1.5 Ghz G4 PowerPC / 1.25 GB DDR333
--Running: Mac OS X 10.4 Tiger

jtpenrod

  • VIP
  • Member
  • ***
  • Posts: 675
  • Kudos: 105
Kdevelop
« Reply #10 on: 16 August 2003, 10:17 »
quote:
heh, is there any way i can force Kdevelop to use iostream.h?

If KDevelop is anything like Glade, which I have used, then you can simply hand-hack the files KDevelop generates to add the iostream include where you want it, even if those files contain warnings that you shouldn't hand-hack them. After all, it's sometimes easier to modify Glade files that they claim you shouldn't modify if it makes programming the app easier.
_____________________________________
Live Free or Die: Linux

"There: now you'll never have to look at those dirty Windows anymore"
      --Daffy Duck
Live Free or Die: Linux
If software can be free, why can't dolphins?

Maniaman

  • Member
  • **
  • Posts: 188
  • Kudos: 0
Kdevelop
« Reply #11 on: 23 August 2003, 23:20 »
I'm not using KDevelop but I'm using g++ and I cant get the iostream file to work...

Code: [Select]
Code: [Select]

[ September 28, 2003: Message edited by: usr/bin/maniaman ]

I use my hotmail email on here to keep from begin spammed by trolls. If you want my good email address for something then ask... :)


Faust

  • Member
  • **
  • Posts: 1,223
  • Kudos: 0
Kdevelop
« Reply #12 on: 24 August 2003, 07:19 »
Works fine for me.

Code: [Select]

May be a silly question, but whats your gcc version and do you have the libraries installed?  Try it with a std:: in front of the cout. (so std::cout << "hello")
Yesterday it worked
Today it is not working
Windows is like that
 -- http://www.gnu.org/fun/jokes/error-haiku.html

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
Kdevelop
« Reply #13 on: 24 August 2003, 15:02 »
Just put
using namespace std;
after the #include.
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


Maniaman

  • Member
  • **
  • Posts: 188
  • Kudos: 0
Kdevelop
« Reply #14 on: 25 August 2003, 04:34 »
The using namespace std; fixed it. Thanks.  
I use my hotmail email on here to keep from begin spammed by trolls. If you want my good email address for something then ask... :)