Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
C++ compilers
Topic Started: Jun 26 2008, 10:16 PM (518 Views)
Reikyrr
Forum God
[ *  *  *  *  *  * ]
Hello,
Im having trouble with c++. Not with the frekin language but with frekin compiling it. Everythime i try c++ im busy with the compilers. And many times the tutorials werent disigned for that compiler or something like that. Only project I was having succes with was irrlicht loading models and such and then i could compile them because i just needed to copy strings and adjust them. But when i began to make simple hello world projects like this one

Code:
 
// a small C++ program
#include <iostream>
int main()
{
std::cout << "Hello, world you drive me crayzy!" << std::endl;
return 0;
}

All hell broke loose. Cant even compile the above.
Ife tried using:
Minigw
DevCC
microsoft Visual C++
and borlands c++
Can someone point me tutorials for a specific compiler?
So i can finally make a "Hello world" script that works
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
same here Irrlicht won't work with Dev C++ but it will run under CodeBlocks.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
Bami
Member Avatar
Guess the character, win a prize
[ *  *  *  *  * ]
For starters, what errors do you get when compiling that?
Here are the thrill seekers, corrupt and immoral.
Posted Image
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Try this instead:
Code:
 

#include <iostream.h>

main()
{
cout << "Hello World!";
return 0;
}

Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
Despellanion
Jun 27 2008, 01:29 AM
Try this instead:
Code:
 

#include <iostream.h>

main()
{
cout << "Hello World!";
return 0;
}

------ Build started: Project: Kut, Configuration: Debug Win32 ------
Compiling...
Kut.cpp
c:\cpp\kut\kut.cpp(1) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
Build log was saved at "file://c:\cpp\Kut\Debug\BuildLog.htm"
Kut - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Now im dazed. How do i put iostream.h in the visual c++ project.

I tried again but then putting the iostream in the same folder. No use. Ive even addet it to the project now im really pissed :sad:
Edited by Reikyrr, Jun 27 2008, 12:52 PM.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
Ruud v A
Member Avatar
Programmer · Artist
[ *  *  *  *  * ]
Your compiler isn't properly installed when it can't find default headers.

Anyway, when I have compiler trouble, it's almost always a reference to some linker/compiler include directory. Make sure you have these properly. But in your case make sure your compiler and default headers are installed and that the compiler can find the headers.
Edited by Ruud v A, Jun 27 2008, 01:00 PM.

Veniogames
Vēnit, ut mē occidĕret.

I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer.
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
Have you tried CodeBlocks?
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
silverfire56
Forum God
[ *  *  *  *  *  * ]
check your header files
Offline Profile Quote Post Goto Top
 
Dead1yM00
Member Avatar
Genius
[ *  *  * ]
#include <iostream.h>

hmm, thats interesting. when i start a project in c++, i put:

#include <iostream>

works for me, but, i hardly know any c++. im still learning the basics.

Also, i use Visual Studio 2005.
Edited by Dead1yM00, Jun 27 2008, 01:20 PM.
"I can't uninstall it, there seems to be some kind of 'Uninstall Shield'."

"Crap... Someone knocked over my recycle bin... There's icons all over my desktop..."

"'INSERT DISK THREE' ? But I can only get two in the drive !"

http://www.gdargaud.net/Humor/QuotesComputer.html
Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
Eanbro
Jun 27 2008, 01:06 PM
Have you tried CodeBlocks?
I will,
(you still rule and guess what. It works fine! :yahoo: ) Progress is going well!
Edited by Reikyrr, Jun 27 2008, 04:03 PM.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
Bami
Member Avatar
Guess the character, win a prize
[ *  *  *  *  * ]
iostream is part of minGW (or Cygwin, depends on your install). Basic headers like that are defined in the precompiler, and thus, don't require a .h extension to the import (or include).

When working with irrlicht or something external, it needs to tell the precompiler to find that (still has to either be in your PATH variable, or in the same directory as your cpp file, or in the include path of your project).

So basically, you were telling your precompiler to find a file that doesn't exist (since its baked IN the precompiler), so it throws an error.

C++ really gets messy with memory management.

Also
Quote:
 
Project: Kut

I like your project naming scheme.
Here are the thrill seekers, corrupt and immoral.
Posted Image
Offline Profile Quote Post Goto Top
 
Ruud v A
Member Avatar
Programmer · Artist
[ *  *  *  *  * ]
Bami
Jun 27 2008, 10:34 PM
Also
Quote:
 
Project: Kut

I like your project naming scheme.
:D

Veniogames
Vēnit, ut mē occidĕret.

I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer.
Offline Profile Quote Post Goto Top
 
« Previous Topic · Off-topic · Next Topic »
Add Reply