Forums: How To Compile Linux Codes On Windows - Forums

Jump to content

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

How To Compile Linux Codes On Windows

#16 User is offline   nemesis 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 20
  • Joined: 30-November 03

Posted 14 April 2004 - 12:18 PM

hi

i'm using vmware with knoppix STD running on it. win2000 seems ok to for gaming and oll other things. But for 'security' i prefer pingu :)

by the way, since i'm not allowed to post a new topic, here's a little question..

command : #sudo su

u gain root acces with that (maybe u all already knew :lol: )
but what the heck ...

can somebody pleas explain how & why ? i already did some searching here, but found nothing or maybe i didn t searched well enough ?
tx ;)
0

#17 User is offline   kyriakosnicola 

  • Private
  • Icon
  • Group: Members
  • Posts: 19
  • Joined: 05-December 03

Posted 25 April 2004 - 04:53 AM

How about compiling them in borland C/C++, wont that work?
as far as i know linux are written in C and C++ so a version of a C/C++ Compiler that runs under windows will propably compile linux exploits such as the one you want to compile. (correct me if i'm wrong, don't let me spread wrong ideas)
0

#18 User is offline   strohunter 

  • Sergeant
  • Icon
  • Group: Members
  • Posts: 208
  • Joined: 29-March 04

Posted 25 April 2004 - 08:32 AM

linux is written is C and ASM, there's no "++" ^^ (i mean in linux, not in 3rd party apps or in some libraries)

you can compil unix code on windows only if the code is a written in pure ANSI C, without using unix library (inet arpa etc...) otherwise, the code will need some tweaks.


and yes sudo/su are command to gain root level, its usefull for admins when they need it and dont want to log out and log in as root just for one or two commands.

if you're wondering if everybody can do that, of course not, you need the root password do to that, but since there's no root password on knoppix.....
(btw knoppix is fun becoz you can always have your linux in your pocket, but people should keep in mind that it's a live cd, for a everyday use, they must install a hd distro ^^)
0

#19 Guest_LittleHacker_*

  • Group: Guests

Posted 27 April 2004 - 09:50 AM

The Problem is with Header files doesn't Exist on windows versions.
btw, I've download Cygwin and installed it.
But I don't know how to begin compileing!
Any Help about it please?
0

#20 User is offline   MsMittens 

  • Staff Sergeant
  • Icon
  • Group: Members
  • Posts: 258
  • Joined: 15-March 04

Posted 27 April 2004 - 09:54 AM

Simple way to compile (using a gcc compiler and Cygwin is a windows-variation IIRC) is:

gcc filetobecompiled.c -o compiledfile

gcc ---> compiler name
filetobecompiled.c ---> the original source code
-o ---> send it to output
compiledfile ---> what you want to call the binary file when it compiles
0

#21 Guest_LittleHacker_*

  • Group: Guests

Posted 27 April 2004 - 09:57 AM

I know gcc but,when I type gcc then cygwin (for windows) replies "command not found"
0

#22 User is offline   polpotx 

  • Private First Class
  • Icon
  • Group: Specialist
  • Posts: 69
  • Joined: 03-December 03

Posted 27 April 2004 - 01:39 PM

I thought this was a problem 2 when i first downloaded cygwin . but what you acualy have to do is download with the same setup.exe the gcc installers . You see the deffault installed doesn;t contain thouse . You just have to download them .. or directly install from internet .

Best Regards
0

#23 User is offline   MsMittens 

  • Staff Sergeant
  • Icon
  • Group: Members
  • Posts: 258
  • Joined: 15-March 04

Posted 27 April 2004 - 03:07 PM

LittleHacker, on Apr 27 2004, 01:57 PM, said:

I know gcc but,when I type gcc then cygwin (for windows) replies "command not found"

No.. get cygwin up and running first. Where did you install it to (you have installed it right? it is a fairly large install IIRC)? When it's running, it's like having a bash shell on windows.
0

#24 Guest_LittleHacker_*

  • Group: Guests

Post icon  Posted 28 April 2004 - 11:10 AM

I've installed it on Root Drive (C:\cygwin) and I think I did it right !
I've Bash shell But I don't know anything about IIRC ?!
0

#25 User is offline   Blake 

  • Former Commander In Chief
  • Icon
  • Group: Retired General
  • Posts: 7,317
  • Joined: 24-September 02

Posted 28 April 2004 - 01:59 PM

You did not install gcc, it is not installed by default. See this link

http://cplus.about.c...y/aa031202b.htm
0

#26 Guest_nenazaboy_*

  • Group: Guests

Posted 01 May 2004 - 12:07 AM

Your can try the following, download the latest version of Dev-cpp, it free!!
it already comes with a gcc compiler as default and it works great.

Then open a new project, add the code. link any libraries that you may need and compile.

i've never found any problems with it. and its fairly easy to use.
0

#27 User is offline   Ollie 

  • Private
  • Icon
  • Group: Members
  • Posts: 12
  • Joined: 21-September 03

Posted 03 May 2004 - 09:22 AM

You could get a shell account from somewhere (like rootshell) which runs emacs and get a windows ssh client (like SSH secure shell client) to connect to it in windows and use that to compile and run exploits, but lots of people that provide shells dont like the idea that you are using it to run exploits so watch what you are doing. :lol:
0

#28 User is offline   forza 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 88
  • Joined: 12-February 04

Posted 07 May 2004 - 05:06 AM

Stupid question perhaps but...

If i compile the C code with CYGWIN do i need CYGWIN to run the compiled file?
For example, If i want to use it on another WIndows Machine....
0

#29 User is offline   hdlgp 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 26
  • Joined: 29-November 03

Posted 07 May 2004 - 09:43 PM

http://www.colinux.org/


:D
0

#30 Guest_Outpour_*

  • Group: Guests

Posted 04 January 2005 - 10:01 PM

This could be considered OT, but in a backwards sort of way it has the effect of creating a windows executable by compiling linux c (or c++) code. I figure someone would be interested.

I have a box running slackware, and I use it to compile programs for use on windows. It is nifty because I can use all the linux only libraries to produce a working win32 exe.

Essentially is is a recompiled version of gcc with the mingw32 module included which allows for cross compilation.

For more info:
hxxp://www.libsdl.org/extras/win32/cross/
0

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • 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