2012-01-16 79 views
0

我想使用將創建三角形條的exe文件。我找到了代碼鏈接。它有一組.c和.h文件,必須使用給定的make文件進行編譯。但是當我嘗試在Windows的cmd Promt中運行make文件時,它說make不會將其識別爲內部命令。我需要幫助來爲此創建一個exe文件。 Here is the link for the code從.c和.h文件創建exe文件

在我提供的鏈接中有一個下載和安裝說明。但對我來說幫助不大。我被卡住了。請幫我創建這個exe文件。謝謝

下面是實際的make文件內容

CC = GCC

CCFLAGS = -ansi -pedantic

模塊= input.o hnet.o comp.o tstrips.o ts_msgs。 ø

PROG:htgen

htgen:$(模塊) $(CC)$(CCFLAGS)-lm -o htgen $(模塊)

input.o:ts_msgs.h ts_types.h input.h input.c $(CC)$(CCFLAGS)-c input.c hnet.o:ts_msgs.h ts_types.h input.h hnet。 h hnet.c $(CC)$(CCFLAGS)-c hnet.c comp.o:ts_msgs.h ts_types.h comp.h comp.c $(CC)$(CCFLAGS)-c comp.c ts_msgs.o:ts_msgs.h ts_msgs.c $(CC)$(CCFLAGS)-c ts_msgs.c tstrips.o:ts_msgs.h input.h hnet.h comp.h tstrips.h tstrips.c $( CC)$(CCFLAGS)-c tstrips.c

.PHONY:clean clean: -rm *〜htgen $(MODULES)

回答

0

這可能需要幾次嘗試。使用Cygwin作爲@Misha建議,並執行此操作:

cd /cygdrive/c/Users/vinod/Downloads/htgen-src/htgen-src 
make 
+0

謝謝。這對我有效。 – Vinodtiru 2012-01-16 03:39:15

1

您使用的是Windows嗎?

有兩條路線走:

  1. 安裝Linux(比較容易)。我會用Wubi來安裝Ubuntu。看看這裏: http://www.ubuntu.com/download/ubuntu/windows-installer。您運行該程序,並在30分鐘內在計算機上安裝Ubuntu。它包含一個卸載程序,可以像正常的Windows程序一樣刪除Ubuntu。
  2. 使用cygwin在Windows中「安裝」這些命令。我會在parralel中安裝一個IDE,比如NetBeans。看看http://netbeans.org/community/releases/69/cpp-setup-instructions.html
+0

是的我正在使用Windows。我嘗試按照建議使用Cygwin cmd promt。我運行命令「$ make/cygdrive/c/Users/vinod/Downloads/htgen-src/htgen-src/Makefile」,我得到了「make:/ cygdrive/c/Users/vinod /下載/ htgen-SRC/htgen-SRC/Makefile文件'」。沒有創建exe文件。我用makefile內容編輯了我的問題。請幫我解決一下這個。謝謝。 – Vinodtiru 2012-01-16 00:27:18