LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-22-2010, 12:03 AM   #1
MasterWill
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Rep: Reputation: 0
Compiling a beta Qt application - 'expected declaration specifiers before ...'


Hello, I'm new to this site, first post. I have found this site most helpful in my Fedora 13 installation. I'm an intermediate Linux user, recently switched from Windows. Any help would be greatly appreciated.

I'm trying to compile a beta MIPS simulator application built on the Qt UI framework, called QtSpim. It's been quite a learning experience for me so far, but I've run into a roadblock. The beta can be downloaded from here: http://pages.cs.wisc.edu/~larus/spim.html (look in the column on the right).

I first had trouble finding qmake, then found out that I could use qmake-qt4. Since I saw that it already had a Makefile, make resulted in
Code:
Makefile:66: *** multiple target patterns.  Stop.
For some reason I was thinking that the developer was using Windows, so I decided to make another Makefile. Ran qmake-qt4 -project, and qmake-qt4 QtSpim.pro ok, then the first error lines of make yielded
Code:
error: spim.h: No such file or directory
, same for several files. I then copied said files from the CPU directory to the current. Then the first error lines of make gave many errors similar to the following:
Code:
In file included from /usr/include/QtCore/qobjectdefs.h:45,
                 from /usr/include/QtGui/qwindowdefs.h:45,
                 from /usr/include/QtGui/qwidget.h:45,
                 from /usr/include/QtGui/qmainwindow.h:45,
                 from /usr/include/QtGui/QMainWindow:1,
                 from spimview.h:37,
                 from spim_support.c:36:
/usr/include/QtCore/qnamespace.h: In function ‘QT_MODULE’:
/usr/include/QtCore/qnamespace.h:54: error: expected declaration specifiers before ‘namespace’
/usr/include/QtCore/qnamespace.h:1744: error: expected declaration specifiers before ‘Q_DECLARE_OPERATORS_FOR_FLAGS’
/usr/include/QtCore/qnamespace.h:1763: error: expected declaration specifiers before ‘class’
/usr/include/QtCore/qnamespace.h:1818: error: expected declaration specifiers before ‘;’ token
It certainly seems like I'm on the right track, but I have no idea how to continue debugging from here. It's probably something simple. Any suggestions? Thanks in advance!

OS:
Fedora release 13 (Goddard) - Linux 2.6.34.7-61.fc13.i686
KDE 4.5.2

And a quick look at the qt packages:
qt - 1:4.6.3-8.fc13 (i686)
qt-devel - 1:4.6.3-8.fc13 (i686)
qt-mysql - 1:4.6.3-8.fc13 (i686)
qt-sqlite - 1:4.6.3-8.fc13 (i686)
qt-x11 - 1:4.6.3-8.fc13 (i686)
qt3 -3.3.8b-29.fc13 (i686)
qt3-config -3.3.8b-29.fc13 (i686)
qtcurve-gtk2 - 1.6.3-1.fc13 (i686)
qtcurve-kde4 - 1.6.3-1.fc13 (i686)
qtscriptbindings - 0.1.0-10.fc13 (i686)
 
Old 11-23-2010, 03:27 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,391

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
http://pages.cs.wisc.edu/~larus/SPIM...m-0_9_1.tar.gz
cd qtspim-0_9/QtSpim/ && qmake-qt4 && make : There are no errors on Fedora 13.
./QtSpim : Will open the QtSPIM GUI.

Suggest : Delete "qtspim-0_9/" and start from scratch.

'qt-devel' is the only dependency.

..

Last edited by knudfl; 11-23-2010 at 03:30 AM.
 
Old 11-29-2010, 07:40 PM   #3
MasterWill
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Ok, so it's qmake-qt4 and make with no arguments - works! That was easy, knew it was something simple. Really appreciate it. Thanks a lot knudfl, you're awesome!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
expected declaration or statement at end of input eMCeee89 Programming 1 05-04-2009 02:54 AM
LXer: Windows 7 Beta Demand Less Than Microsoft Expected? LXer Syndicated Linux News 3 01-26-2009 05:22 PM
LXer: Windows 7 Beta Demand Less Than Microsoft Expected? LXer Syndicated Linux News 0 01-26-2009 07:42 AM
LXer: More than 2.5 Million Expected to Test Windows 7 Public Beta LXer Syndicated Linux News 1 01-13-2009 04:44 AM
error: expected declaration or statement at end of input ? psernaalvarez Programming 3 02-16-2008 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration