2013-03-17 113 views
0

我写了ggc clock.c -o clock,假设它会编译到文件“clock”,但显然不是。我确实看到它带有一个Makefile,除非我不太清楚你如何使用它。如何使用Makefile在cygwin上编译cli-clock?

下面是我使用的链接。 https://github.com/Unixhub/cli-clock

clock.c:6:21: ncurses.h: No such file or directory 
clock.c:54: error: parse error before "WINDOW" 
clock.c:54: warning: no semicolon at end of struct or union 
clock.c:56: warning: data definition has no type or storage class 
clock.c:68: error: parse error before '*' token 
clock.c:68: warning: data definition has no type or storage class 
clock.c: In function `init': 
clock.c:89: error: request for member `bg' in something not a structure or union 
clock.c:95: error: `stdscr' undeclared (first use in this function) 
clock.c:95: error: (Each undeclared identifier is reported only once 
clock.c:95: error: for each function it appears in.) 
clock.c:99: error: `OK' undeclared (first use in this function) 
clock.c:100: error: request for member `bg' in something not a structure or union 
clock.c:102: error: request for member `bg' in something not a structure or union 
clock.c:102: error: request for member `bg' in something not a structure or union 
clock.c:103: error: request for member `bg' in something not a structure or union 
clock.c:103: error: request for member `option' in something not a structure or union 
clock.c:104: error: request for member `option' in something not a structure or union 
clock.c:104: error: request for member `bg' in something not a structure or union 
clock.c:115: error: request for member `running' in something not a structure or union 
clock.c:116: error: request for member `geo' in something not a structure or union 
clock.c:117: error: request for member `geo' in something not a structure or union 
clock.c:118: error: request for member `geo' in something not a structure or union 
clock.c:119: error: request for member `geo' in something not a structure or union 
clock.c:120: error: request for member `geo' in something not a structure or union 
clock.c:121: error: request for member `geo' in something not a structure or union 
clock.c:122: error: request for member `tm' in something not a structure or union 
clock.c:122: error: request for member `lt' in something not a structure or union 
clock.c:123: error: request for member `lt' in something not a structure or union 
clock.c:127: error: request for member `framewin' in something not a structure or union 
clock.c:127: error: request for member `geo' in something not a structure or union 
clock.c:128: error: request for member `geo' in something not a structure or union 
clock.c:129: error: request for member `geo' in something not a structure or union 
clock.c:130: error: request for member `geo' in something not a structure or union 
clock.c:131: error: `LINES' undeclared (first use in this function) 
clock.c:131: error: request for member `geo' in something not a structure or union 
clock.c:132: error: `COLS' undeclared (first use in this function) 
clock.c:132: error: request for member `geo' in something not a structure or union 
clock.c:133: error: request for member `framewin' in something not a structure or union 
clock.c:135: error: request for member `framewin' in something not a structure or union 
clock.c: In function `signal_handler': 
clock.c:149: error: request for member `running' in something not a structure or union 
clock.c: In function `update_hour': 
clock.c:158: error: request for member `tm' in something not a structure or union 
clock.c:158: error: request for member `lt' in something not a structure or union 
clock.c:159: error: request for member `lt' in something not a structure or union 
clock.c:161: error: request for member `tm' in something not a structure or union 
clock.c:164: error: request for member `date' in something not a structure or union 
clock.c:165: error: request for member `date' in something not a structure or union 
clock.c:168: error: request for member `date' in something not a structure or union 
clock.c:168: error: request for member `tm' in something not a structure or union 
clock.c:169: error: request for member `date' in something not a structure or union 
clock.c:169: error: request for member `tm' in something not a structure or union 
clock.c:172: error: request for member `date' in something not a structure or union 
clock.c:172: error: request for member `tm' in something not a structure or union 
clock.c:173: error: request for member `date' in something not a structure or union 
clock.c:173: error: request for member `tm' in something not a structure or union 
clock.c: In function `draw_number': 
clock.c:189: error: request for member `framewin' in something not a structure or union 
clock.c:190: error: request for member `framewin' in something not a structure or union 
clock.c:192: error: request for member `framewin' in something not a structure or union 
clock.c: In function `draw_clock': 
clock.c:200: error: request for member `date' in something not a structure or union 
clock.c:201: error: request for member `date' in something not a structure or union 
clock.c:204: error: request for member `framewin' in something not a structure or union 
clock.c:205: error: request for member `framewin' in something not a structure or union 
clock.c:206: error: request for member `framewin' in something not a structure or union 
clock.c:209: error: request for member `date' in something not a structure or union 
clock.c:210: error: request for member `date' in something not a structure or union 
clock.c:213: error: request for member `framewin' in something not a structure or union 
clock.c:214: error: request for member `framewin' in something not a structure or union 
clock.c:215: error: request for member `framewin' in something not a structure or union 
clock.c:218: error: request for member `date' in something not a structure or union 
clock.c:219: error: request for member `date' in something not a structure or union 
clock.c: In function `clock_move': 
clock.c:224: error: request for member `framewin' in something not a structure or union 
clock.c:224: error: request for member `geo' in something not a structure or union 
clock.c:224: error: request for member `geo' in something not a structure or union 
clock.c: In function `key_event': 
clock.c:231: error: request for member `option' in something not a structure or union 
clock.c:232: error: `stdscr' undeclared (first use in this function) 
clock.c:235: error: request for member `running' in something not a structure or union 
clock.c: In function `main': 
clock.c:247: error: request for member `option' in something not a structure or union 
clock.c:247: error: `COLOR_BLUE' undeclared (first use in this function) 
clock.c:248: error: request for member `option' in something not a structure or union 
clock.c:250: error: request for member `running' in something not a structure or union 
clock.c:259:2: warning: no newline at end of file 
+0

如果有Makefile,它就是输入到'make'工具。试试'make'。您可能需要安装其他软件包,至少包括'ncurses'和/或所谓的'ncurses-devel'或类似的东西。检查必要条件(可能是源文件中名为INSTALL或README的文件)。 – vonbrand 2013-03-17 15:18:40

回答

3

Cygwin的是大的也只有一小部分通常被默认安装。其余分为分开安装的软件包。

您需要添加至少libncurses-devel包,可能还有其他包。运行setup.exe,回答常见问题,在搜索行输入ncurses,选择最后一个版本libncurses-devel,继续安装。

如果有Makefile,请在其所在的目录中输入make。这将运行构建过程。

请注意,除非该程序在Cygwin中进行了测试,否则不会有任何保证。