hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

Full Version: Cygwin Tutorial!
Mephisto
Can someone give me a tutorial or a small guide on how to compile a *.C File in Cygwin

Greetz & many thnx:"

Mephisto
shahzad
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" wink.gif
Jinco77
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?
Dillinja
CODE
gcc  file1.c file2.c file3.c -o iroffer.exe
virus
QUOTE (Jinco77 @ Aug 15 2003, 03:08 PM)
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.gif
Will find out and let u know ...
flap
QUOTE (shahzad @ Aug 13 2003, 06:06 AM)
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" wink.gif

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

greetz flap
virus
I googled for the make file tutorial and found this:

1. http://mrbook.org/tutorials/make/
2. http://www.contrib.andrew.cmu.edu/usr/mds2...2/Makefile.html

Hope it helps
bdark
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
mamep
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?
JdEeZy
Thanks for the links virus. Helped a lot
LittleHacker
Thanks guys.
Dose cygwin has a GUI compiler for C?
SCVirus
QUOTE (LittleHacker @ May 8 2004, 07:17 PM)
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.
realloader
How to compile this?
gcc -o mysql mysql.c -L/usr/lib/mysql -lmysqlclient

from here:
http://www.k-otik.com/exploits/09.14.mysql.c.php
tonikgin
what is this, unix in a nutshell?
tonikgin
QUOTE (Jinco77 @ Aug 15 2003, 11: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?

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.
suluking
HI,
I have installed Cygwin, and when i wanted to compile a file in c:\exploit.c i get this error:

$gcc c:\exploit.c -o exploit.exe
Bash: gcc : command was not found


what should i do?
suluking
Hi,
i have found the answer for my question,
in fact when i install Cygwin for the first time, GCC is not installed by default, i get an option to choose to install it with other utilities like editors and stuff.....

thanks anyway..
biggrin.gif
blahplok
wow, thank to all of you...
sure i need a cgywin tutor, but here i find a good answer....
thank's.... thank's...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.