天嵌 ARM开发社区

 找回密码
 注册
查看: 1470|回复: 3

按照文档进行操作出现了错误Makefile:70: *** missing separator. Stop.

[复制链接]
福大牛二爷 发表于 2013-6-19 11:34:40 | 显示全部楼层 |阅读模式
本帖最后由 福大牛二爷 于 2013-6-19 11:42 编辑

Makefile:70: *** missing separator.  Stop.
不知道是不是Makefile文件没有弄好,希望高手们看看啊··我对过了,已经改成一样的了,但是make出现了错误:
Makefile:70: *** missing separator.  Stop.

参照:天嵌科技出品--Qt程序开发完全手册之24小时超级版本_V2.2_20100606.pdf的 P39页开始
我的Makefile 文件已经改成如下了:
  1. #############################################################################
  2. # Makefile for building first
  3. # Generated by tmake at 10:38, 2013/06/19
  4. #     Project: first
  5. #    Template: app
  6. #############################################################################

  7. ####### Compiler, tools and options

  8. CC        =        gcc
  9. CXX        =        g++
  10. CFLAGS        =        -pipe -Wall -W -O2 -DNO_DEBUG
  11. CXXFLAGS=        -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG
  12. INCPATH        =        -I$(QTDIR)/include -I$(QPEDIR)/include
  13. LINK        =        g++
  14. LFLAGS        =        
  15. LIBS        =        $(SUBLIBS) -L$(QPEDIR)/lib -L$(QTDIR)/lib -lqpe -lqtopia -lqte
  16. MOC        =        $(QTDIR)/bin/moc
  17. UIC        =        $(QTDIR)/bin/uic

  18. TAR        =        tar -cf
  19. GZIP        =        gzip -9f

  20. ####### Files

  21. HEADERS =        first.h
  22. SOURCES =        first.cpp \
  23.                 main.cpp
  24. OBJECTS =        first.o \
  25.                 main.o \
  26.                 first.o
  27. INTERFACES =        first.ui
  28. UICDECLS =        first.h
  29. UICIMPLS =        first.cpp
  30. SRCMOC        =        moc_first.cpp \
  31.                 moc_first.cpp
  32. OBJMOC        =        moc_first.o \
  33.                 moc_first.o
  34. DIST        =        
  35. TARGET        =        first
  36. TARGET=                $(QPEDIR)/image/opt/Qtopia/bin/first
  37. DESKTOP=        $(QPEDIR)/image/opt/Qtopia/apps/EmbedSky/first.desktop
  38. ICON=                $(QPEDIR)/image/opt/Qtopia/pics/first.png

  39. INTERFACE_DECL_PATH = .

  40. ####### Implicit rules

  41. .SUFFIXES: .cpp .cxx .cc .C .c

  42. .cpp.o:
  43.         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ [        DISCUZ_CODE_0        ]lt;

  44. .cxx.o:
  45.         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ [        DISCUZ_CODE_0        ]lt;

  46. .cc.o:
  47.         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ [        DISCUZ_CODE_0        ]lt;

  48. .C.o:
  49.         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ [        DISCUZ_CODE_0        ]lt;

  50. .c.o:
  51.         $(CC) -c $(CFLAGS) $(INCPATH) -o $@ [        DISCUZ_CODE_0        ]lt;

  52. ####### Build rules


  53. all: $(TARGET)
  54. cp -f first.desktop $(DESKTOP)
  55. cp -f first.png $(ICON)

  56. $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
  57.         $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

  58. moc: $(SRCMOC)

  59. tmake: Makefile

  60. Makefile: first.pro
  61.         tmake first.pro -o Makefile

  62. dist:
  63.         $(TAR) first.tar first.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
  64.         $(GZIP) first.tar

  65. clean:
  66.         -rm -f $(OBJECTS) $(OBJMOC) $(DESKTOP) $(ICON) $(TARGET)
  67.         -rm -f *~ core

  68. ####### Sub-libraries


  69. ###### Combined headers


  70. ####### Compile

  71. first.o: first.cpp \
  72.                 first.h \
  73.                 first.ui

  74. main.o: main.cpp \
  75.                 first.h \
  76.                 /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include/qtopia/qpeapplication.h

  77. first.h: first.ui
  78.         $(UIC) first.ui -o $(INTERFACE_DECL_PATH)/first.h

  79. first.cpp: first.ui
  80.         $(UIC) first.ui -i first.h -o first.cpp

  81. first.o: first.cpp \
  82.                 first.h \
  83.                 first.ui

  84. moc_first.o: moc_first.cpp \
  85.                 first.h

  86. moc_first.o: moc_first.cpp \
  87.                 first.h

  88. moc_first.cpp: first.h
  89.         $(MOC) first.h -o moc_first.cpp

  90. moc_first.cpp: first.h
  91.         $(MOC) first.h -o moc_first.cpp
复制代码

这是PDF上的截图,文件太大了,传不上来







本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 福大牛二爷 发表于 2013-6-19 12:52:02 | 显示全部楼层
本帖最后由 福大牛二爷 于 2013-6-19 13:09 编辑

找到错误了,是 那个 cp 命令前面忘记加 tab建了但是有出现如下问题了:

下面是我的main.cpp是按照PDF手册操作的:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
亚瑟王 发表于 2013-6-19 14:52:27 | 显示全部楼层
亲,手册里面的70和71行都是加了tab键的哦,在Makefile中命令都是要加tab隔开的。
 楼主| 福大牛二爷 发表于 2013-6-19 23:19:59 | 显示全部楼层
恩 解决了 哈哈 谢谢啊 ~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-7-3 05:32 , Processed in 1.062500 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表