Syntax error: new line unexpected - QtCreator

I want to develop some Qt applications with the QtCreator IDE on Ubuntu 12.04. When I try to create even the simplest project, I get this error:

/home/jerzu/QtTest/qt-test/mainwindow.ui:-1: error: 2: .. / qt -test / mainwindow.ui: Syntax error: new line is unexpected

And when I use the command line ( qmake2 ProjectName.pro ), everything goes well. I am sure the qmake path in QtCreator is correct.

Do you have any idea what is going on?

EDIT:

mainwindow.ui

 <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>MainWindow</class> <widget class="QMainWindow" name="MainWindow"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>300</height> </rect> </property> <property name="windowTitle"> <string>MainWindow</string> </property> <widget class="QWidget" name="centralWidget"/> <widget class="QMenuBar" name="menuBar"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>25</height> </rect> </property> </widget> <widget class="QToolBar" name="mainToolBar"> <attribute name="toolBarArea"> <enum>TopToolBarArea</enum> </attribute> <attribute name="toolBarBreak"> <bool>false</bool> </attribute> </widget> <widget class="QStatusBar" name="statusBar"/> </widget> <layoutdefault spacing="6" margin="11"/> <resources/> <connections/> </ui> 

output line

17:23:26: steps for the QtTest project ... 17:23:26: The configuration has not changed, skipping the qmake step. 17:23:26: Start: "/ usr / bin / make" .. /QtTest/mainwindow.ui -o ui_mainwindow.h .. /QtTest/mainwindow.ui: 2: ../ QtTest / mainwindow.ui: Syntax error: new line unexpected make: * [ui_mainwindow.h] Error 2 17:23:26: Process "/ usr / bin / make" exited with code 2. Error creating / deploying QtTest project (bundle: Beagle-xM2) When doing step

EDIT2:

Makefile:

http://shrib.com/CBm2rKJV

+6
source share
1 answer

Thanks for your support, I finally solved my problem. As Guilherme said, it was all about setting up the environment ... I had to reconfigure and fix some of Kit's options, especially the compiler paths, and choose a good qmake version to work with every single compiler I installed.

A small hint of them that will create applications for the BeagleBoard and use the angstrom-linux-gnueabi toolchain:

Until you run QtCreator, you SHOULD run (...)/angstrom/arm/environment-setup ! And then run QtCreator FROM CONSOLE . This is what I had to do to create a proper working environment.

Relations Jerzu

+1
source

All Articles