GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 26-May-2004, 21:35
ToyMachine22122 ToyMachine22122 is offline
New Member
 
Join Date: May 2004
Posts: 3
ToyMachine22122 is on a distinguished road

Beginning C Programming


OK so I just started learning C. I've learned a lot of other languages now I think I'm ready for this one.

I downloaded some tutorials and stuff and they give me a sample program. I am using DevC++, here is what I do (I'm running Windows XP Home if it makes any difference):
1) Open Dev-C++
2) Click New Project
3) Create as "Console Application" type "C Project"
4) Copy+Paste the program from the tutorial to Dev-C++. Program code is at bottom of my post.
5) Go to Execute->Compile

Then this appears at the bottom of the window:


Here's the program code:
Code:
#ident "@(#) Hello World - my first program" #include <stdio.h> char *format = "%s", *hello = "Hello World...\n"; main() { printf ( format, hello ); }

And here are my errors from the compile log:
Code:
Compiler: Default compiler Building Makefile: "C:\Documents and Settings\Greg\My Documents\Makefile.win" Executing make... make.exe -f "C:\Documents and Settings\Greg\My Documents\Makefile.win" all Execution terminated
Now, I don't really know what's wrong, but judged from this my guess is that it's trying to use make.exe to make a temp somethin-or-other. Problem is, I don't have make.exe on my computer.

I can't find anywhere to download a windows port of make.exe, however I could find a windows port of nmake.exe, if that will work. I tried setting it as the make utility under Tools->Compiler Options->Programs but I HAVE to cancel out of that box otherwise it says "You have not indicated the location of your binaries (compiler). Please do so now"

Could someone please tell me what I need to do? I have CYGWIN, but it doesn't have anything close to a make utility as far as I can tell and plus I'd really like to avoid using it if it's humanly possible because frankly I can't stand it, mainly because of the fact that it's a BASH shell i guess.

Thanks for anything you can provide!
  #2  
Old 26-May-2004, 22:12
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold
Quote:
Originally Posted by ToyMachine22122
OK so I just started learning C. I've learned a lot of other languages now I think I'm ready for this one.



And here are my errors from the compile log:
Code:
Compiler: Default compiler Building Makefile: "C:\Documents and Settings\Greg\My Documents\Makefile.win" Executing make... make.exe -f "C:\Documents and Settings\Greg\My Documents\Makefile.win" all Execution terminated
Now, I don't really know what's wrong, but judged from this my guess is that it's trying to use make.exe to make a temp somethin-or-other. Problem is, I don't have make.exe on my computer.


Thanks for anything you can provide!

Dev-C++ opens a console window, executes your program, then closes the console window and returns to the Dev-C++ GUI.

Put the following line after your printf() statement:

CPP / C++ / C Code:
  getchar();

Now, the console window stays open until you hit the "Enter" key.

Good luck!

Dave
  #3  
Old 26-May-2004, 23:00
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Hi ToyMachine. Welcome to GIDForums.

If Dave's suggestion doesn't work, I would be interested to know which version of dev-c++ version that you downloaded. Did you get the full version with mingw/GCC? Here is a compile log of a succesful compilation on my version of dev-c++ (full version 4.9.8.7)

Code:
Compiler: Default compiler Building Makefile: "D:\src\gid\streamflow\Makefile.win" Executing make clean rm -f test.o test.exe g++.exe -c test.cpp -o test.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -Id:/db/include/ g++.exe test.o -o "test.exe" -L"C:/Dev-Cpp/lib" Execution terminated Compilation successful

This is much diffferent than what you have, so I think you may have a problem. I did not need to download a seperate make, I just installed the full version and it worked. Let us know if you are still having problems.

Cheers,
d
  #4  
Old 27-May-2004, 13:26
ToyMachine22122 ToyMachine22122 is offline
New Member
 
Join Date: May 2004
Posts: 3
ToyMachine22122 is on a distinguished road
Copied and pated from the Dev-C++ website:
Dev-C++ 5.0 beta 8 (4.9.8.0) (12 MB) with Mingw/GCC 3.2

I think something might have been wrong in the install or settings or something now because none of the sample programs with Dev-C++ will compile either.

I'm just guessing but this feels like one of those many things I've been through where I forgot to do what to most people is the most obvious thing, so I'm going to make sure that everyone understands where I'm coming from:

I have not changed ANY configurations in Dev-C++; ALL I have done is installed it and run it. To tell the truth I don't even know how to change the settings because I tried once and it said something about my binaries are not defined blah blah so I just had to cancel out.
  #5  
Old 27-May-2004, 21:11
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Hey Toymachine.

Have you tried to uninstall and re-install? Also have you tried to use the non-beta version (currently 4.9.8.9)?

This really set up easily for me without any intervention or special settings. I really think that something fouled up with the installation. Try the current version and see if that does anything.

Don't give up. This is a really decent editor in my opinion and I think that you will be pleased with it once you get it set up.

HTH,
d
  #6  
Old 29-May-2004, 12:53
ToyMachine22122 ToyMachine22122 is offline
New Member
 
Join Date: May 2004
Posts: 3
ToyMachine22122 is on a distinguished road
I downloaded 4.8.9.8 and I get the same thing on it as the beta :-(

I guess I'll just switch programs, but it would be helpful if someone could recommend another good one that is compatible with Windows, because so far Dev-C++ is the only one I've heard of that people seem to like.

Thanks for your help guys
  #7  
Old 29-May-2004, 16:55
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
isn't there a gcc for windows?
__________________
spasms!!!
  #8  
Old 30-May-2004, 11:07
Garth Farley Garth Farley is offline
Awaiting Email Confirmation
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
Welll there's quite a few Windows equivalents. A pure port is djgpp, but there's mingw which also supports windows programming. Then there's loads of commercial ones like Borland & Microsoft's Visual C++. Plenty of choice, and all with their own ideas of what should be standard.

GF
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 16:41
Need some exercises in C++, plus info on GUI programming. BlockAndBash C++ Forum 4 18-May-2004 21:07
Help with windows programming Mjkramer21 C++ Forum 12 16-Apr-2004 00:50
I need programming help... dewil C Programming Language 10 04-Mar-2004 08:53
Web and Flash design. PHP, MySQL, ASP, JSP programming. artem Web Design Forum 4 28-Apr-2002 05:36

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 10:35.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.