2017-08-14 101 views
0

我目前正試圖在macOS上構建此應用程序https://github.com/ieatlint/SWipe,我沒有任何運氣。我不太瞭解構建應用程序,但這是我迄今爲止所做的。建築SWILE應用程序

git clone https://github.com/ieatlint/SWipe 
cd SWipe 
qmake SWipe.pro 
make 

而這正是我得到一個錯誤:

make 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/local/Cellar/qt/5.9.1/lib/QtMultimedia.framework/Headers -I/usr/local/Cellar/qt/5.9.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.9.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.9.1/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt/5.9.1/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.9.1/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.9.1/lib -o main.o main.cpp 
main.cpp:1:10: fatal error: 'QtGui/QApplication' file not found 
#include <QtGui/QApplication> 
    ^
1 error generated. 
make: *** [main.o] Error 1 

我嘗試用sudo nano SWipe.pro下它說:QT += core gui multimedia將其添加QT += widgetsSWipe.pro文件,但沒有奏效。

+0

只是''。 – AlexanderVX

回答

0

我剛剛克隆它,看看。這裏是什麼地方錯了代碼:

  • (此後再運行QMAKE)的小部件添加到親文件你已經做了
  • 在main.cpp的變化包括從QtGui/QApplication的只是應用程序(如通過AlexanderVX建議)
  • 做相同的swipe.h爲QtGui/QMainWindow中,並改變它在swipe.cpp變化audioFormat.setFrequency(48000)於audioFormat.setSampleRate(48000)剛QMainWindow的
  • ,假設是什麼它應該這樣做,因爲沒有set頻率函數
  • in swipe.cpp cha NGE audioFormat.setChannels(1)audioFormat.setChannelCount(1),假設它是應該做的,因爲沒有setChannels在我的MAC功能

我做到這一點,它建立這種方式。沒有運行它,因爲我沒有真正看着這件事在做什麼......這是你的工作現在我猜