|
-
November 13th, 2002, 08:17 AM
#1
-
November 13th, 2002, 10:29 AM
#2
Hi, read this thread to get some ideas on compiling a C program in Linux:
http://www.antionline.com/showthread...hreadid=233985
The reason you got error when compiling it in Windows is the compiler couldn't find the header file "unp.h", which I believe contains definition for MAXLINE and other things.
Peace always,
<jdenny>
Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds
-
November 13th, 2002, 11:08 AM
#3
Hiii
gcc daytime.c -o daytime
daytime.c:1:24: unp.h: No usch file or directory
-
November 13th, 2002, 11:45 AM
#4
As I mentioned, the error occured because the compiler (gcc this time) couldn't find the header file "unp.h".
I'm not sure how the program works, but apparently it consists of two files, the main program "daytime.c" and header file "unp.h". daytime.c contains the main routines of the program and uses some macros, structures, etc (like MAXLINE) defined in unp.h. BOTH must exist in the same directory in order to compile successfully.
So, find your unp.h file, put it in the same directory as daytime.c and try to recompile. HTH. Good luck.
Peace always,
<jdenny>
Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds
-
November 13th, 2002, 11:47 AM
#5
gcc daytime.c -o daytime
daytime.c:1:24: unp.h: No usch file or directory
You're on the right track you just had the files the wrong way try it like this
gcc -o <file name> <file name.c>
try that that should compile it
hope i helped
By the sacred **** of the sacred psychedelic tibetan yeti ....We\'ll smoke the chinese out
The 20th century pharoes have the slaves demanding work
http://muaythaiscotland.com/
-
November 13th, 2002, 07:32 PM
#6
Senior Member
well for some reason i can't seem to download the file you attached, but maybe i can help with the compiler command
gcc starts is the c compiler
the -o modifer lets you name the object file. if you didn't use it, it would name the file a.out.
so typing
gcc -o <source code> <program name> will return the compiled program <program name>
to start the program, you would type ./<program name>
U suk at teh intuhnet1!!1!1one
-
November 13th, 2002, 10:24 PM
#7
Member
im trying to do the same exact thing COMPILE A C FILE. except im trying to it on windows. anyone wanna help me. i have downloaded several command based porgrams but dont understand any.
-
November 14th, 2002, 12:40 AM
#8
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|