Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hi, could any one tell me about how to convert a C file into an .exe file.Also what if i have to convert that program into a setup. For example ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Location
    India
    Posts
    24

    Post Converting a C File Into .exe


    Hi, could any one tell me about how to convert a C file into an .exe file.Also what if i have to convert that program into a setup.
    For example if i have a screen saver in C.How can I convert it into a setup file to install it(maybe on a windows platform)

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Are you talking about taking a Linux executable created in C and compiling it to run on Windows?...Gerard4143
    Make mine Arch Linux

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    you would have to compile it for windows platform, most likely you would use mingw and its libraries, creating an installer would be a separate task, I suggest you get a working executable for the application first, then worry about the installer

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2009
    Location
    India
    Posts
    24
    Hey let me rephrase my question.I have a working C program for a screensaver.Now I want to make it into a setup for a windows box.How do I get the . exe and the setup.Do I have to use a C compiler on windows box to do that.
    Also while we are at it.Could some one please tell if iI compile a C program on windows and linux.What is the difference b/w the output of the compilation(as in what kind of file is produced).

  6. #5
    Just Joined!
    Join Date
    Jul 2009
    Location
    India
    Posts
    24
    Quote Originally Posted by coopstah13 View Post
    you would have to compile it for windows platform, most likely you would use mingw and its libraries, creating an installer would be a separate task, I suggest you get a working executable for the application first, then worry about the installer
    Hey coophstaw thanx for your reply.But could you please be more specific on how I could get an .exe file.

  7. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    do you have the source for this c program? assuming you are using linux, most likely you are using gcc to compile C source into linux executable, if you want to create exe you need to use mingw to compile into windows executable.

  8. #7
    Just Joined!
    Join Date
    Jul 2009
    Location
    India
    Posts
    24
    Quote Originally Posted by coopstah13 View Post
    do you have the source for this c program? assuming you are using linux, most likely you are using gcc to compile C source into linux executable, if you want to create exe you need to use mingw to compile into windows executable.
    Yes as I said in my earlier post I have a working program and I'm using gcc.

  9. #8
    Linux Newbie egan's Avatar
    Join Date
    Feb 2009
    Location
    Mountain View, CA
    Posts
    132
    If your screensaver uses system calls specfic to linux or library calls for specific packages it will most likely not work on windows.

  10. #9
    Just Joined!
    Join Date
    Jul 2009
    Location
    India
    Posts
    24
    Quote Originally Posted by gerard4143 View Post
    Are you talking about taking a Linux executable created in C and compiling it to run on Windows?...Gerard4143
    Well gerard I have a running program of screensaver (it is running on a windows box).I want to convert it into an exe file(obviously for windows ).So is there any software which converts a C program into .exe.Also when I compile a C file on linux and windows the output of compilation is it an object file in both the cases.

  11. #10
    Just Joined!
    Join Date
    Jul 2009
    Location
    India
    Posts
    24
    Ok i just googled it I guess what I'm lokking for is a linker(Corect me if I'm wrong).
    Also if sum one has a clue how to go about it help would be appreciated

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •