| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		appalsap Moderator
  Reputation: 0
  Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
  | 
		
			
				 Posted: Fri Apr 06, 2007 12:31 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				well, the reason it doesn't recognize printf is because it can't find the prototypes because it can't find stdio.h.
 
 
Now, this means
 
 
1) you didn't install properly and set up your environment variables
 
2) you moved the files around
 
 
Solution?
 
 
1) double check your reinstall
 
 
Temporary Solution?
 
 
1) Go to \include\ and copy stdio.h over to the same folder as your .c
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		--Pillboi-- Grandmaster Cheater Supreme
  Reputation: 0
  Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
  | 
		
			
				 Posted: Fri Apr 06, 2007 12:56 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | appalsap wrote: | 	 		  well, the reason it doesn't recognize printf is because it can't find the prototypes because it can't find stdio.h.
 
 
Now, this means
 
 
1) you didn't install properly and set up your environment variables
 
2) you moved the files around
 
 
Solution?
 
 
1) double check your reinstall
 
 
Temporary Solution?
 
 
1) Go to \include\ and copy stdio.h over to the same folder as your .c | 	  
 
Lol. I didn't install C. Lmao. What a n00b. I thought the computer already had it on.   Where to install from?
 
I'll go with the temporary solution for the moment. Thanks appalasp. Also sorry for PMing you and for asking so many questions.    
 
 
--Pillboi--
 _________________
    
 
Enter darkness, leave the light, Here be nightmare, here be fright...
 
Earth and Water, Fire and Air. Prepare to meet a creature rare.
 
Enter now if you dare, Enter now the dragon's lair. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		appalsap Moderator
  Reputation: 0
  Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
  | 
		
			
				 Posted: Fri Apr 06, 2007 12:59 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				you probably didn't do the autoexec.bat and the .cfg stuff, if you did, then you should be able to run bcc32 from anywhere (and it will find and recognize the headers)
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		--Pillboi-- Grandmaster Cheater Supreme
  Reputation: 0
  Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
  | 
		
			
				 Posted: Fri Apr 06, 2007 1:32 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | appalsap wrote: | 	 		  | you probably didn't do the autoexec.bat and the .cfg stuff, if you did, then you should be able to run bcc32 from anywhere (and it will find and recognize the headers) | 	  
 
Yeah I asked another question related to that on the last page:
 
 	  | --Pillboi-- wrote: | 	 		  | My big problem following the tutorials is that I don't know where to find the "system path". Any help?  | 	  
 
Thanks. That sounds much easier once I've done it, lol.
 
 
--Pillboi--
 _________________
    
 
Enter darkness, leave the light, Here be nightmare, here be fright...
 
Earth and Water, Fire and Air. Prepare to meet a creature rare.
 
Enter now if you dare, Enter now the dragon's lair. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		appalsap Moderator
  Reputation: 0
  Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
  | 
		
			
				 Posted: Fri Apr 06, 2007 1:47 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				system path? for what? context please?
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		--Pillboi-- Grandmaster Cheater Supreme
  Reputation: 0
  Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
  | 
		
			
				 Posted: Fri Apr 06, 2007 1:57 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | appalsap wrote: | 	 		  | system path? for what? context please? | 	  
 
Sorry, I should have been more specific.
 
 	  | Quote: | 	 		  | Add to your system path the directory C:\Borland\BCC55\bin. | 	  
 
From http://www.gidnetwork.com/b-72.html.
 
I decided to try and follow a different tutorial than the one you posted because it made me dizzy.       
 
 
--Pillboi--
 _________________
    
 
Enter darkness, leave the light, Here be nightmare, here be fright...
 
Earth and Water, Fire and Air. Prepare to meet a creature rare.
 
Enter now if you dare, Enter now the dragon's lair. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		appalsap Moderator
  Reputation: 0
  Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
  | 
		
			
				 Posted: Fri Apr 06, 2007 2:00 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				probably means %PATH%
 
 
go to start -> my computer -> right click -> advanced -> environment variables -> path
 
 
type in
 
 
C:\Borland\BCC55\bin; before everything else and apply changes
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		--Pillboi-- Grandmaster Cheater Supreme
  Reputation: 0
  Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
  | 
		
			
				 Posted: Fri Apr 06, 2007 2:09 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | appalsap wrote: | 	 		  probably means %PATH%
 
 
go to start -> my computer -> right click -> advanced -> environment variables -> path
 
 
type in
 
 
C:\Borland\BCC55\bin; before everything else and apply changes | 	  
 
When I right click on my computer in the start bar, in the drop-down menu, there isn't advanced... Thanks anyway. I'm running Windows XP if it helps.
 
 
I only get:
 
 	  | Code: | 	 		  Open
 
Browse with Paint Shop Pro 8
 
Explore
 
Search...
 
Manage
 
-----------------------
 
Map Network Drive...
 
Disconnect Network Drive...
 
-----------------------
 
Show on desktop
 
Rename
 
-----------------------
 
Properties | 	  
 
 
--Pillboi--
 _________________
    
 
Enter darkness, leave the light, Here be nightmare, here be fright...
 
Earth and Water, Fire and Air. Prepare to meet a creature rare.
 
Enter now if you dare, Enter now the dragon's lair. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Flyte Peanuts!!!!
  Reputation: 6
  Joined: 19 Apr 2006 Posts: 1887 Location: Canada
  | 
		
			
				 Posted: Fri Apr 06, 2007 3:37 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				| Start -> Control Panel -> System -> Advanced Tab -> Environment Variables
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		appalsap Moderator
  Reputation: 0
  Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
  | 
		
			
				 Posted: Fri Apr 06, 2007 4:38 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				pillboi, click on properties
 
 
or do what flyte said
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		SF I'm a spammer
  Reputation: 119
  Joined: 19 Mar 2007 Posts: 6028
 
  | 
		
			
				 Posted: Fri Apr 06, 2007 7:49 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				| I got visual studio free through my school..only problem is my computer sucks and doesn't like to run it and anything else together.
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		pyr0magex Grandmaster Cheater Supreme
  Reputation: 0
  Joined: 26 Jun 2006 Posts: 1192 Location: my room
  | 
		
			
				 Posted: Fri Apr 06, 2007 9:47 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				I have a few questions.
 
 
I was reading a C book, and it said that this program
 
 
 	  | Code: | 	 		  
 
#include <stdio.h>
 
 
int main(void)                /* a simple program             */
 
 
{
 
 
    int num;                  /* define a variable called num */
 
 
    num = 1;                  /* assign a value to num        */
 
 
 
 
    printf("I am a simple "); /* use the printf() function    */
 
 
    printf("computer.\n");
 
 
    printf("My favorite number is %d because it is first.\n",num);
 
 
 
 
    return 0;
 
 
}
 
 | 	  
 
 
 
should write something to the screen. However, when I run the program, it always opens up a cmd, and quickly closes, meaning I have to go to the cmd, change the path, and run it from there.
 
 
But my question is, can C programs (exe's) be run outside/without a cmd prompt? Or must c executables always be in a cmd prompt.
 
 
If they don't have to, it would be nice if someone could explain how. I've tried a lot, and it all results in the same stuff.
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		appalsap Moderator
  Reputation: 0
  Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
  | 
		
			
				 Posted: Fri Apr 06, 2007 9:50 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				yes they can pyro. Easiest way to view it is to make it pause, or wait for user input, like put a 
 
 
 
 
at the end. Alternatively you can make a windows GUI but thats a hassle for small programs.
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		pyr0magex Grandmaster Cheater Supreme
  Reputation: 0
  Joined: 26 Jun 2006 Posts: 1192 Location: my room
  | 
		
			
				 Posted: Fri Apr 06, 2007 9:57 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				Yea, I read that. However, I was wondering how I could make a GUI with a C program, and/or how I could just print characters to a screen, not in a cmd.
 
 
Perhaps I'm just not understanding the whole concept =x
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		DeltaFlyer Grandmaster Cheater
  Reputation: 0
  Joined: 22 Jul 2006 Posts: 666
 
  | 
		
			
				 Posted: Sat Apr 07, 2007 12:38 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | pyr0magex wrote: | 	 		  Yea, I read that. However, I was wondering how I could make a GUI with a C program, and/or how I could just print characters to a screen, not in a cmd.
 
 
Perhaps I'm just not understanding the whole concept =x | 	  
 
To make GUI try this tutorial http://www.winprog.org/tutorial/ and always keep a window open for msdn.
 
 
What do you mean by "printing characters to a screen"? Isn't the cmd window on the screen? The cmd window is the standard output, so any thing sent with printf will be sent to that screen.
 
 
If you meant something that's in a window, the easiest way is probably just the message box:
 
 
 	  | Code: | 	 		  
 
int num = 1;
 
char out [30];
 
 
sprintf(out,"This is %d",num);
 
MessageBoxA(NULL, out, "HI", MB_OK);
 
 | 	  
 
 
Don't forget to include windows.h if you're going to use that.
 _________________
  
 
Wow.... still working at 827... what's INCA thinking?
 
zomg l33t hax at  this place (IE only). Over 150 people have used it, what are YOU waiting for? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |