Forums: Cygwin Tutorial! - Forums

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Cygwin Tutorial!

#1 User is offline   Mephisto 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 46
  • Joined: 08-August 03

Posted 12 August 2003 - 03:14 PM

Can someone give me a tutorial or a small guide on how to compile a *.C File in Cygwin

Greetz & many thnx:"

Mephisto
0

#2 User is offline   shahzad 

  • Private
  • Icon
  • Group: Members
  • Posts: 2
  • Joined: 12-August 03

Posted 12 August 2003 - 10:06 PM

hmm ok here i m to give u a small syntax tutorial!


just log on to cygwin shell! and go to the directory, that u have .c files in.
just use the following command to compile it.

#gcc file.c -o file
and it will compile the file to "file.exe" ;)
0

#3 Guest_Jinco77_*

  • Group: Guests

Posted 15 August 2003 - 03:08 AM

what if you want to compile something like say... iroffer which has multiple .c files? How would you make all of those into 1 exe?
0

#4 User is offline   Dillinja 

  • Specialist
  • Icon
  • Group: Specialist
  • Posts: 1,014
  • Joined: 18-June 03

Posted 15 August 2003 - 03:29 AM

gcc  file1.c file2.c file3.c -o iroffer.exe

0

#5 User is offline   virus 

  • Specialist
  • Icon
  • Group: Members
  • Posts: 506
  • Joined: 05-July 03

Posted 15 August 2003 - 04:09 AM

Jinco77, on Aug 15 2003, 03:08 PM, said:

what if you want to compile something like say... iroffer which has multiple .c files? How would you make all of those into 1 exe?

I think what u are talking about is the 'make file' command where u complie multiple .c files which belong to the same program. What it does is makes use of the timestamp to check whether the file was modified ... if yes, then it compiles that file with the rest, otherwise it makes use of a previously compiled file. The thing is ... I can't seem to be able to recall the syntax for this command .... :huh:
Will find out and let u know ...
0

#6 Guest_flap_*

  • Group: Guests

Posted 15 August 2003 - 04:24 AM

shahzad, on Aug 13 2003, 06:06 AM, said:

hmm ok here i m to give u a small syntax tutorial!


just log on to cygwin shell! and go to the directory, that u have .c files in.
just use the following command to compile it.

#gcc file.c -o file
and it will compile the file to "file.exe" ;)

"just log on to cygwin shell!" eeeeeeeeeeeeh there... chill out dude.. i am just a big fat linux newbbb :) ... tell me more about this plz.

greetz flap
0

#7 User is offline   virus 

  • Specialist
  • Icon
  • Group: Members
  • Posts: 506
  • Joined: 05-July 03

Posted 15 August 2003 - 05:10 AM

I googled for the make file tutorial and found this:

1. http://mrbook.org/tutorials/make/
2. http://www.contrib.a...2/Makefile.html

Hope it helps
0

#8 User is offline   bdark 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 87
  • Joined: 30-January 04

Posted 02 May 2004 - 10:38 AM

i'm having some troubles using cygwin.. first i moved the desired .c file to cygwin directory, then i executed the command: #g++ myfile.cc -o myProg

but it doesn't create anything, neither displays any error

anyone knows what i'm doing wrong ?

thanks
0

#9 User is offline   mamep 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 35
  • Joined: 06-January 04

Posted 02 May 2004 - 07:02 PM

g++ is for c++
gcc is for c..
have u installed the gcc package or g++ @ cygwin??
what the msg you get after running command?
0

#10 User is offline   JdEeZy 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 47
  • Joined: 19-August 03

Posted 02 May 2004 - 07:39 PM

Thanks for the links virus. Helped a lot
0

#11 Guest_LittleHacker_*

  • Group: Guests

Posted 08 May 2004 - 11:17 AM

Thanks guys.
Dose cygwin has a GUI compiler for C?
0

#12 User is offline   SCVirus 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 125
  • Joined: 01-February 04

Posted 08 May 2004 - 12:09 PM

LittleHacker, on May 8 2004, 07:17 PM, said:

Dose cygwin has a GUI compiler  for C?

no, but why would you need one? typing gcc file -o file.exe is simpler then opening a gui program creating a 'project' and so on. I believe cygwin does come with emacs however, which will color code your files.
0

#13 User is offline   realloader 

  • Corporal
  • Icon
  • Group: Members
  • Posts: 164
  • Joined: 05-December 03

Posted 08 May 2004 - 05:20 PM

How to compile this?
gcc -o mysql mysql.c -L/usr/lib/mysql -lmysqlclient

from here:
http://www.k-otik.co....14.mysql.c.php
0

#14 Guest_tonikgin_*

  • Group: Guests

Posted 09 May 2004 - 03:27 AM

what is this, unix in a nutshell?
0

#15 Guest_tonikgin_*

  • Group: Guests

Posted 09 May 2004 - 03:30 AM

Jinco77, on Aug 15 2003, 11:08 AM, said:

what if you want to compile something like say... iroffer which has multiple .c files? How would you make all of those into 1 exe?

compile iroffer .c to exe in cygwin? just download the windows binary off the iroffer website. unless you went in and modified the code to suit your need better... but you asking what u did, makes me think thats not the case.
0

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

  • Share



Our Sponsors:


SwiftLayer Affiliate Web Hosting