1

I've just installed qt sdk and qt eclipse plugin on Windows 7,and afterwards when i created a new gui project, i got this 2 errors at building:

***make missing separator.Stop.

and

make:***[debug]Error 2

The first error appears in

{.}.cpp{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
<<//here(it doesn't find any separator)

How can i solve this 2 errors?

My makefile:

#############################################################################
# Makefile for building: lala
# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed May 23 11:23:51 2012
# Project:  lala.pro
# Template: app
#############################################################################

####### Compiler, tools and options

CC            = cl
CXX           = cl
DEFINES       = -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -    DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 - DQT_THREAD_SUPPORT
CFLAGS        = -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 $(DEFINES)
CXXFLAGS      = -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189   $(DEFINES)
INCPATH       = -I"..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore" -   I"..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtGui" -I"..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\include" - I"..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\default"
LINK          = link
LFLAGS        = /LIBPATH:"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib" /NOLOGO /DYNAMICBASE     /NXCOMPAT /DEBUG /MANIFEST /MANIFESTFILE:"debug\lala.intermediate.manifest"   /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common- Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*'  processorArchitecture='*'"
LIBS          = c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib\qtmaind.lib c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib\QtGuid4.lib  c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib\QtCored4.lib 
QMAKE         = c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin\qmake
IDC           = c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin\idc.exe
IDL           = midl
ZIP           = zip -r -9
DEF_FILE      = 
RES_FILE      = 
COPY          = copy /y
SED           = 
COPY_FILE     = $(COPY)
COPY_DIR      = xcopy /s /q /y /i
DEL_FILE      = del
DEL_DIR       = rmdir
MOVE          = move
CHK_DIR_EXISTS= if not exist
MKDIR         = mkdir
INSTALL_FILE    = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR     = $(COPY_DIR)

####### Output directory 

OBJECTS_DIR   = debug

####### Files

SOURCES       = main.cpp \
    lala.cpp debug\moc_lala.cpp
OBJECTS       = debug\main.obj \
    debug\lala.obj \
    debug\moc_lala.obj
DIST          = 
QMAKE_TARGET  = lala
DESTDIR        = debug\ #avoid trailing-slash linebreak
TARGET         = lala.exe
DESTDIR_TARGET = debug\lala.exe

####### Implicit rules

.SUFFIXES: .c .cpp .cc .cxx

{.}.cpp{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

{.}.cc{debug\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

{.}.cxx{debug\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

{.}.c{debug\}.obj::
$(CC) -c $(CFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

{debug}.cpp{debug\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

{debug}.cc{debug\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

{debug}.cxx{debug\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

{debug}.c{debug\}.obj::
$(CC) -c $(CFLAGS) $(INCPATH) -Fodebug\ @<<
$<
<<

####### Build rules

first: all
all: Makefile.Debug $(DESTDIR_TARGET)

$(DESTDIR_TARGET): ui_lala.h $(OBJECTS) 
$(LINK) $(LFLAGS) /OUT:$(DESTDIR_TARGET) @<< 
  $(OBJECTS) $(LIBS)
<<
mt.exe -nologo -manifest "debug\lala.intermediate.manifest" - outputresource:$(DESTDIR_TARGET);1

qmake:  FORCE
@$(QMAKE) -o Makefile.Debug lala.pro

dist:
$(ZIP) lala.zip $(SOURCES) $(DIST) lala.pro  ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\qconfig.pri ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\modules\qt_webkit_version.pri ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\qt_functions.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\qt_config.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\exclusive_builds.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\default_pre.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\default_pre.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\debug.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\debug_and_release.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\default_post.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\default_post.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\build_pass.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\rtti.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\exceptions.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\stl.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\shared.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\embed_manifest_exe.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\embed_manifest_dll.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\warn_on.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\qt.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\thread.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\moc.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\win32\windows.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\resources.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\uic.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\yacc.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\lex.prf ..\..\..\..\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\features\include_source_dir.prf c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib\qtmaind.prl  HEADERS RESOURCES IMAGES SOURCES  OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES 

clean: compiler_clean 
-$(DEL_FILE) debug\main.obj debug\lala.obj debug\moc_lala.obj
-$(DEL_FILE) debug\lala.intermediate.manifest debug\lala.exp debug\lala.ilk vc*.pdb vc*.idb

distclean: clean
-$(DEL_FILE) debug\lala.pdb
-$(DEL_FILE) $(DESTDIR_TARGET)
-$(DEL_FILE) Makefile.Debug

check: first

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: debug\moc_lala.cpp
compiler_moc_header_clean:
-$(DEL_FILE) debug\moc_lala.cpp
debug\moc_lala.cpp: ui_lala.h \
    lala.h
C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin\moc.exe $(DEFINES) $(INCPATH) -   D_MSC_VER=1600 -DWIN32 lala.h -o debug\moc_lala.cpp

compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_lala.h
compiler_uic_clean:
-$(DEL_FILE) ui_lala.h
ui_lala.h: lala.ui
c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin\uic.exe lala.ui -o ui_lala.h

compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_uic_clean 



####### Compile

debug\main.obj: main.cpp lala.h \
    ui_lala.h

debug\lala.obj: lala.cpp lala.h \
    ui_lala.h

debug\moc_lala.obj: debug\moc_lala.cpp 

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:
ironflower
  • 101
  • 1
  • 4
  • 11
  • Have you tried qmake from the command line, to isolate if its eclipse or Qt? – Brady May 23 '12 at 08:03
  • Can you show full content of your makefile? – sorush-r May 23 '12 at 08:18
  • @sorush-r I've edited my post,now you can see my makefile.Also for @Brady(Dont know if this is what you asked for) C:\Windows\system32>qmake c:\users\alexa\workspace\lala\main.cpp c:\users\alexa\workspace\lala\main.cpp:6: Unknown test function: int main c:\users\alexa\workspace\lala\main.cpp:8: Unknown test function: QApplication a c:\users\alexa\workspace\lala\main.cpp:8: Parse Error ('QApplication a(argc, arg v);') c:\users\alexa\workspace\lala\main.cpp:8: Unterminated conditional block at end of file Error processing project file: c:/users/alexa/workspace/lala/main.cpp – ironflower May 23 '12 at 08:35
  • @ironflower: Your QtSDK is built using which tool-chain? `qmake/gcc` or `nmake/cl`? From where have you downloaded that QtSDK? – Ammar May 23 '12 at 09:59
  • @Ammar i've downloaded from the qt servers.my qt doesn't recognize nmake,only qmake. – ironflower May 23 '12 at 18:46

2 Answers2

0

This might be due to some mistakes in your Makefile.

make***make is a fatal error,So it can't continue with this error.if you have line no: info that is indicated by missing separator error, Try putting TAB in that line and re-run make.

Other separator characters are :, = etc. And also check there are spaces b/n assignments in Makefile.

ScarCode
  • 3,074
  • 3
  • 19
  • 32
  • NOw I still got the error 2 but instead i receive make[1]:***No rule to make target`debug\lala.exe',needed by all`'.Stop. – ironflower May 23 '12 at 09:48
  • check that issue here..http://stackoverflow.com/questions/834748/gcc-makefile-error-no-rule-to-make-target – ScarCode May 23 '12 at 10:08
0

If you have downloaded Qt SDK which is compiled using qmake/gcc tool-chain, then you need make specification file (win32-g++) which uses g++ as a compiler and not cl (Microsoft Visual C++ Compiler) as your specification file suggests.

But If you have Qt SDK which is compiled using nmake/cl tool-chain, then your specification file is valid, just you need to use nmake instead of qmake.

Ammar
  • 1,947
  • 14
  • 15
  • how can i specify the to use win32-g++ ? – ironflower May 23 '12 at 18:53
  • @ironflower: You've downloaded QtSDK from Qt servers, so it would be compiled using `qmake/g++` tool-chain. Now to set specification file as `win32-g++`, go to the QtSDK folder, you'll see `mkspec` folder where `spec` files are there for all platforms and tool-chains. Verify `spec` file in `default` folder, if its the `msvc` one, then copy files from `win32-g++` and put it in the `default` folder. – Ammar May 24 '12 at 06:01
  • @ironflower: If above method don't work, then you should look for command line parameters of `qmake` may be in plugin options (I don't have experience with plugins, but QtCreator), there is an `-spec` option, verify which `spec` file is written there. If its `-spec default` then above method will work. Otherwise change it into `-spec win32-g++`. Hope this helps. – Ammar May 24 '12 at 06:05