Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos Qt+;cocoa:架构x86_64的未定义符号_Macos_Cocoa_Qt - Fatal编程技术网

Macos Qt+;cocoa:架构x86_64的未定义符号

Macos Qt+;cocoa:架构x86_64的未定义符号,macos,cocoa,qt,Macos,Cocoa,Qt,我正在Qt中组合cocoa代码,不幸的是出现了一个符号未找到错误。 我正在使用MacOSX10.8.2和QtCreator来构建我的代码 appcontroller.h #ifndef APPCONTROLLER_H #define APPCONTROLLER_H // Import the Cocoa and ImageCaptureCore headers #include <Cocoa/Cocoa.h> #include <ImageCaptureCore/ImageC

我正在Qt中组合cocoa代码,不幸的是出现了一个符号未找到错误。 我正在使用MacOSX10.8.2和QtCreator来构建我的代码

appcontroller.h

#ifndef APPCONTROLLER_H
#define APPCONTROLLER_H

// Import the Cocoa and ImageCaptureCore headers
#include <Cocoa/Cocoa.h>
#include <ImageCaptureCore/ImageCaptureCore.h>

// Create a public interface for the controller
@interface appController : NSObject

// Create delegates for the device browser and camera device classes.
<ICDeviceBrowserDelegate, ICCameraDeviceDelegate> {

// Create an instance variable for the device browser
// and an array for the cameras the browser finds
ICDeviceBrowser * mDeviceBrowser;
NSMutableArray * mCameras;

// Define Interface Builder outlets for two
// array controllers -- one for cameras,
// one for the chosen camera's files
IBOutlet NSArrayController * mCamerasController;
IBOutlet NSArrayController * mMediaFilesController;

// Define IB outlets for the tableviews used to
// display the cameras and the chosen camera's contents
IBOutlet NSTableView * mCameraContentTableView;
IBOutlet NSTableView * mCamerasTableView;
}

// Cameras are properties of the device browser stored in an array
@property(retain) NSMutableArray* cameras;

// Create a boolean to indicate whether the camera has images to download
@property(readonly) BOOL canDownload;
@end


#endif // APPCONTROLLER_H
要复制到剪贴板,请将视图切换到纯文本模式

及 ObjectiveC-Integrate.pro

QT += core gui multimedia

TARGET = ObjectiveC-Integrate
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

CONFIG -= app_bundle
CONFIG += x86_64
CONFIG -= i386
LIBS += -lssl -lcrypto
LIBS += -framework AppKit

OBJECTIVE_HEADERS += \
appcontroller.h

OBJECTIVE_SOURCES += \
appcontroller.mm
要复制到剪贴板,请将视图切换到纯文本模式 在谷歌上进行了大量搜索并查看了其他帖子后,我无法在我的机器上构建代码。
当我在main.cpp中包含上述COCOA头时,就会出现数千个错误(@traste)

< P>不能将目标C标题(AppMultult.h)包含到C++文件(main .CPP)中。C++不理解目标C./P>
您需要使用一个在这个答案中给出的方法:

您不能将目标C标题(AppMultult.h)包含到C++文件(main .CPP)中。C++不理解目标C./P> 您需要使用此答案中给出的方法之一:

QT += core gui multimedia

TARGET = ObjectiveC-Integrate
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

CONFIG -= app_bundle
CONFIG += x86_64
CONFIG -= i386
LIBS += -lssl -lcrypto
LIBS += -framework AppKit

OBJECTIVE_HEADERS += \
appcontroller.h

OBJECTIVE_SOURCES += \
appcontroller.mm