Makefiles

This is a discussion on Makefiles within the Windows Programming forums, part of the Platform Specific Boards category; Hello! I have used makefiles with Linux. You just name a file makefile, then you call make from the terminal ...

  1. #1
    Algorithm engineer
    Join Date
    Jun 2006
    Posts
    286

    Makefiles

    Hello!

    I have used makefiles with Linux. You just name a file makefile, then you call make from the terminal and it will compile your source files. But how can you do the same in windows? When I try to use the command make in the command prompt, it says that make isn't a command. I guess I will have to install some program called make. Or is it called something else in window? Does it come with any program, like gcc or g++? I tried to find an installation file for gcc or g++ for windows, but I didn't find any windows executable file, and I don't know how to compile from source, can someone guide me to do that? And does the makefiles in windows have to have an special file ending?

    By the way, I also downloaded cygwin, but I'm not sure of t's function. I chose to install gcc and g++, how do you run them? Where are they installed, can I run them without using cygwin? Is there some package manager for cygwin so you can search for packages? I have also heard that you can emulate a linux distributin under cygwin. Is that possible? Can I for example download an ubuntu image file and emulate it? If so where can I find it?
    Come on, you can do it! b( ~_')

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    A lot of your questions are well-suited for a search engine. The phrase "make utility" comes to mind. Also, things like MinGW come with a make (so does Borland and others), so perhaps your toolchain already provides such a beast. I believe cygwin has documentation.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Algorithm engineer
    Join Date
    Jun 2006
    Posts
    286
    I have installed MinGW with both gcc, g++ and make. Still the command doesn't work, even after rebooting my computer. Do I have to register make as a command or something? Does the program make have to be in any specific folder?
    Come on, you can do it! b( ~_')

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,639
    Did you set the system path to point to the bin directory of MinGW?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefiles, GCC's -ggdb option, and Valgrind
    By Jesdisciple in forum C Programming
    Replies: 5
    Last Post: 03-14-2009, 04:25 PM
  2. how to create VC++ 2005 makefiles
    By Ancient Dragon in forum C++ Programming
    Replies: 4
    Last Post: 03-13-2006, 10:29 AM
  3. Benefits of makefiles
    By Ganoosh in forum C++ Programming
    Replies: 2
    Last Post: 06-27-2005, 09:42 PM
  4. programming linux with gcc, emacs, and makefiles
    By Captain Penguin in forum Linux Programming
    Replies: 1
    Last Post: 11-02-2002, 11:04 AM
  5. Help with Makefiles
    By WebmasterMattD in forum Linux Programming
    Replies: 3
    Last Post: 05-24-2002, 08:51 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21