Results 1 to 3 of 3

Thread: Mac OSX Build Issues

  1. #1
    Join Date
    Feb 2010
    Location
    London
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Exclamation Mac OSX Build Issues

    I am developing on a PC and a MAC.

    My program compiles and runs perfectly on the PC but when I go to build it on the MAC I get a lot of errors which I know aren't causing errors. (If that makes sense.)

    Here is the compile output:

    Running build steps for project 3DViewer_simplified...
    Configuration unchanged, skipping QMake step.
    Starting: /usr/bin/make -w

    make: Entering directory `/Users/elizabethtweedale/Desktop/3DViewer_2010.07.21_2'
    g++ -c -pipe -g -gdwarf-2 -arch i386 -Wall -W -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtOpenGL.framework/Versions/4/Headers -I/usr/include/QtOpenGL -I/usr/include -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I. -I. -F/Library/Frameworks -o glwidget.o OpenGL/glwidget.cpp
    In file included from OpenGL/../PhysicsSystem/physics.h:31,
    from OpenGL/glwidget.cpp:6:
    OpenGL/../PhysicsSystem/relationships.h:44: error: expected identifier before '(' token
    OpenGL/../PhysicsSystem/relationships.h:44: error: expected `}' before '(' token
    OpenGL/../PhysicsSystem/relationships.h:44: error: expected unqualified-id before 'float'
    OpenGL/../PhysicsSystem/relationships.h:44: error: expected `)' before 'float'
    OpenGL/../PhysicsSystem/relationships.h:44: error: expected `)' before 'float'
    OpenGL/../PhysicsSystem/relationships.h:59: error: expected `)' before '*' token
    OpenGL/../PhysicsSystem/relationships.h:61: error: expected constructor, destructor, or type conversion before ';' token
    OpenGL/../PhysicsSystem/relationships.h: In function 'Entity* getA()':
    OpenGL/../PhysicsSystem/relationships.h:63: error: '_a' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'Entity* getB()':
    OpenGL/../PhysicsSystem/relationships.h:64: error: '_b' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'void setA(Entity*)':
    OpenGL/../PhysicsSystem/relationships.h:65: error: '_a' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'void setB(Entity*)':
    OpenGL/../PhysicsSystem/relationships.h:66: error: '_b' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'void turnOff()':
    OpenGL/../PhysicsSystem/relationships.h:67: error: '_isOn' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'void turnOn()':
    OpenGL/../PhysicsSystem/relationships.h:68: error: '_isOn' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:69: error: non-member function 'bool isOff()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'bool isOff()':
    OpenGL/../PhysicsSystem/relationships.h:69: error: '_isOn' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:70: error: non-member function 'bool isOn()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'bool isOn()':
    OpenGL/../PhysicsSystem/relationships.h:70: error: '_isOn' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:71: error: non-member function 'bool isAttractive()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'bool isAttractive()':
    OpenGL/../PhysicsSystem/relationships.h:71: error: '_isAttractive' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'void setAttractive(bool)':
    OpenGL/../PhysicsSystem/relationships.h:72: error: '_isAttractive' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'void kill()':
    OpenGL/../PhysicsSystem/relationships.h:73: error: '_isDead' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:74: error: non-member function 'bool isDead()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'bool isDead()':
    OpenGL/../PhysicsSystem/relationships.h:74: error: '_isDead' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:76: error: non-member function 'float getStrength()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'float getStrength()':
    OpenGL/../PhysicsSystem/relationships.h:76: error: '_strength' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:77: error: non-member function 'float getDamping()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'float getDamping()':
    OpenGL/../PhysicsSystem/relationships.h:77: error: '_damping' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:79: error: 'MinDistance' does not name a type
    OpenGL/../PhysicsSystem/relationships.h:80: error: variable or field 'setMinDistanceId' declared void
    OpenGL/../PhysicsSystem/relationships.h:80: error: 'MinDistance' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h:82: error: non-member function 'float getMinDistance()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'float getMinDistance()':
    OpenGL/../PhysicsSystem/relationships.h:82: error: '_minDistance' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: In function 'void setMinDistance(float)':
    OpenGL/../PhysicsSystem/relationships.h:83: error: '_minDistance' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:85: error: non-member function 'int getID()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h: In function 'int getID()':
    OpenGL/../PhysicsSystem/relationships.h:85: error: '_id' was not declared in this scope
    OpenGL/../PhysicsSystem/relationships.h: At global scope:
    OpenGL/../PhysicsSystem/relationships.h:89: error: non-member function 'QVariant data(int, int)' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h:92: error: non-member function 'float getSatisfaction()' cannot have cv-qualifier
    OpenGL/../PhysicsSystem/relationships.h:94: error: expected unqualified-id before 'protected'
    OpenGL/../PhysicsSystem/relationships.h:97: error: 'MinDistance' does not name a type
    OpenGL/../PhysicsSystem/relationships.h:108: error: expected declaration before '}' token
    OpenGL/../PhysicsSystem/relationships.h:47: warning: 'QStringList getMinDistanceNames()' defined but not used
    OpenGL/../PhysicsSystem/relationships.h:52: warning: 'QList<float> getMinDistanceValues()' defined but not used
    make: *** [glwidget.o] Error 1

    make: Leaving directory `/Users/elizabethtweedale/Desktop/3DViewer_2010.07.21_2'
    Exited with code 2.
    Error while building project 3DViewer_simplified
    When executing build step 'Make'



    Any and all help would be greatly appriciated.

  2. #2
    Join Date
    Jun 2010
    Location
    India
    Posts
    50
    Thanks
    1
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Mac OSX Build Issues

    If you are sure that the syntax is correct, you may check for correct new line endings. How did you bring your code from windows to mac ?

    PS:dos2unix

  3. #3
    Join Date
    Feb 2010
    Location
    London
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Mac OSX Build Issues

    Hi agathiyaa,

    Yes, I'm sure the syntax is correct. It builds and runs using the same syntax on the Windows computer. I've also tested the line in question in a project built from scratch on the mac and it builds with no errors.

    In short, I brought the code from Windows to Mac by copying over the project folder and opening the .pro file. I'm using QT Creator and this method has worked fairly smoothly for me in the past.

    Best, Elizabeth

Similar Threads

  1. Replies: 1
    Last Post: 14th January 2010, 00:35
  2. 4.6.0 issues on OS X 10.6 with GL
    By treaves in forum Qt Programming
    Replies: 2
    Last Post: 2nd December 2009, 18:12
  3. Moving from QT 4.5 shared build to QT 4.5.2 static build
    By extrakun in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2009, 10:49
  4. Customized build (problems, bugs, patches, licencing issues...)
    By Domagoj Saric in forum Installation and Deployment
    Replies: 2
    Last Post: 6th October 2009, 11:48
  5. Replies: 3
    Last Post: 28th December 2007, 12:02

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.