我正在使用Xcode 6.1 beta构建一个SpriteKit游戏,我最初是使用Xcode 6.0.1的发行版创建的.由于6.0.1中的sks损坏问题,我切换到6.1.现在,我在启动时遇到运行时错误:
dyld: Symbol not found: _swift_isaMask
Run Code Online (Sandbox Code Playgroud)
我知道这是一个链接器错误,但我该怎么做才能修复它?或者我应该在Xcode 6.1中创建一个新项目并复制我的文件?谢谢.
编辑1:我尝试使用Xcode 6.1创建一个全新的项目,我仍然得到同样的错误.
我正在定义一个NSString用作NSError中的错误域,并且正在复制ASIHttpRequest在那里做的事情.
NSString* const FPServerAPIErrorDomain = @"FPServerAPIErrorDomain";
Run Code Online (Sandbox Code Playgroud)
我把const放在它自己的.h文件// FPServerAPICoordinatorConstants.h中
#ifndef FirePlayer_FPServerAPICoordinatorConstants_h
#define FirePlayer_FPServerAPICoordinatorConstants_h
NSString* const FPServerAPIErrorDomain = @"FPServerAPIErrorDomain";
#endif
Run Code Online (Sandbox Code Playgroud)
但是当我把它包含在一个以上的时候
SomeFile.m
#import "FPServerAPICoordinatorConstants.h"
SomeOtherFile.m
#import "FPServerAPICoordinatorConstants.h"
Run Code Online (Sandbox Code Playgroud)
我收到链接器错误'重复符号'
ld: duplicate symbol _FPServerAPIErrorDomain in SomeFile.o and ....SomeOtherFile.o for architecture armv7
Run Code Online (Sandbox Code Playgroud)
所以我将const更改为#define,它运行正常.
// FPServerAPICoordinatorConstants.h
#ifndef FirePlayer_FPServerAPICoordinatorConstants_h
#define FirePlayer_FPServerAPICoordinatorConstants_h
//THIS WAS TRIGGERING link errors
//NSString* const FPServerAPIErrorDomain = @"FPServerAPIErrorDomain";
//working OK
#define FPServerAPIErrorDomain @"FPServerAPIErrorDomain"
#endif
Run Code Online (Sandbox Code Playgroud)
但有没有办法让const在全球空间不要抛出"重复的符号"?
我在将Xcode项目构建到设备和模拟器时遇到了麻烦.我收到了CrashlyticsFramework和Fabric.framework的一堆重复符号错误.
错误看起来像这样:
duplicate symbol _OBJC_IVAR_$_CLSIcon._prerendered in:
/Users/Abdi/Desktop/app-ios/Pods/CrashlyticsFramework/Crashlytics.framework/Crashlytics(CLSIcon.o)
/Users/Abdi/Desktop/bento-ios/Fabric.framework/Fabric(CLSIcon.o)
duplicate symbol _OBJC_IVAR_$_CLSIcon._size in:
/Users/Abdi/Desktop/app-ios/Pods/CrashlyticsFramework/Crashlytics.framework/Crashlytics(CLSIcon.o)
/Users/Abdi/Desktop/app-ios/Fabric.framework/Fabric(CLSIcon.o)
duplicate symbol _OBJC_METACLASS_$_CLSIcon in:
/Users/Abdi/Desktop/app-ios/Pods/CrashlyticsFramework/Crashlytics.framework/Crashlytics(CLSIcon.o)
/Users/Abdi/Desktop/bento-ios/Fabric.framework/Fabric(CLSIcon.o)
ld: 305 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud) 我已经从Rust安装页面在Windows上安装了Rust 。安装后,我尝试运行“ hello world”程序,但收到以下错误。
>cargo run
Run Code Online (Sandbox Code Playgroud)
错误
Compiling helloworld v0.1.0 (C:\Users\DELL\helloworld)
error: linker `link.exe` not found
note: The system cannot find the file specified. (os error 2)
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that VS 2013, VS 2015 or VS 2017 was installed with the Visual C++ option
error: aborting due to previous error
error: Could not compile `helloworld`.
To learn more, run the command again with …Run Code Online (Sandbox Code Playgroud) 可能重复:
g ++未定义的typeinfo引用
未定义的符号"vtable for ..."和"typeinfo for ..."?
我不能用我的班级.
class Accel {
public:
virtual void initialize(void);
virtual void measure(void);
virtual void calibrate(void);
virtual const int getFlightData(byte);
};
class Accel_ad : public Accel {
public:
Accel_ad() : Accel(){}
void initialize(void) {/*code code code...*/}
void measure(void) {/*measure code*/}
const int getFlightData(byte axis){/*getting data*/}
void calibrate(void) {
int findZero[FINDZERO];
int dataAddress;
uint8_t data[2];
for (byte calAxis = XAXIS; calAxis < ZAXIS; calAxis++) {
if (calAxis == YAXIS) dataAddress = 0x32;
if (calAxis == …Run Code Online (Sandbox Code Playgroud) 我有一个使用OpenGL 3.2(+ libs)和FreeType2的程序.然后用Boost和OpenSSL编写另一个程序.OpenGL方面是为了确保文本可以呈现,而boost/openssl程序是为了安全登录/游戏服务器.
两个程序都可以通过他们的自我运作.
然而,将Boost和OpenSSL添加到游戏(GL + freetype)项目导致它无法链接.
我已经链接了以下的库以及包含文件夹的文件夹.
glimg.lib glutil.lib glfw.lib opengl32.lib freetype.lib glew32.lib user32.lib libeay32.lib ssleay32.lib
链接器错误是.
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__DeregisterEventSource@4
1>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__ReportEventA@36
1>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__RegisterEventSourceA@8
1>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__DeleteDC@4
1>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__DeleteObject@4
1>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__GetBitmapBits@12 …Run Code Online (Sandbox Code Playgroud) c++ linker-errors visual-studio-2010 unresolved-external linker-warning
现在,我只是想在按下按钮时让'www.google.com'加载到webview中.在设计器中添加webview后,链接器开始变得疯狂.我在Windows 7上使用QT Creater 2.6.1和QT5.我在.pro文件中添加了QT + ='webkit stuff'.我已经尝试过清理和重建,仍然会遇到链接器错误.
由于某些奇怪的原因#include <QWebView>在任何文件中添加" "会产生一个找不到文件的错误:"C:\ Users\Scott\Desktop\eCookBook\eCookBook2\cookbook.cpp:3:错误:C1083:无法打开包含文件:'QWebView':没有相应的文件和目录"
cookbook.h:
#ifndef COOKBOOK_H
#define COOKBOOK_H
#include <QMainWindow>
#include <QtWebKit/QWebElement>
#include <QtWebKit/QtWebKit>
#include <QtWebKitWidgets/QWebPage>
namespace Ui {
class cookBook;
}
class cookBook : public QMainWindow
{
Q_OBJECT
public:
explicit cookBook(QWidget *parent = 0);
~cookBook();
private slots:
void on_pushButton_clicked();
void on_textBrowser_anchorClicked(const QUrl &arg1);
private:
Ui::cookBook *ui;
//QWebPage page;
};
#endif // COOKBOOK_H
Run Code Online (Sandbox Code Playgroud)
cookbook.cpp
#include "cookbook.h"
#include "ui_cookbook.h"
//#include <QWebView>
//#include <QtWebKit/QtWebKit>
cookBook::cookBook(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::cookBook)
{
ui->setupUi(this); …Run Code Online (Sandbox Code Playgroud) 我有一个使用XCode 6.0.1创建的XCode工作区.它拥有2个(Swift)库和一个依赖于这2个库的iOS应用程序(Swift).我有稳定的设置,允许我在iPhone和模拟器上运行iOS应用程序:2个库项目被添加为应用程序的嵌入式二进制文件(见图片).
现在,我有XCode 6.1.最近,我在XCode运行时删除了DerivedData文件夹中的~/Library/Developer/Xcode文件夹.之后我的工作区不起作用 - iOS应用程序将无法编译,我收到链接器错误,说它无法找到库项目.
我试图通过从应用程序项目的嵌入式二进制文件中删除我的2个库来解决它- 我无法将它们添加回去.单击项目设置中嵌入式二进制文件下的+按钮可正确显示工作区项目,但选择和添加库项目不会将它们添加到嵌入式二进制文件列表中.我通过创建新工作区解决了链接器错误.应用程序编译,但它如何链接库对我来说是个谜:它们不在列出的嵌入式二进制文件或链接框架和不在框架搜索路径中的库中.应用程序和它需要的库之间似乎没有任何关联(显然有编译时),除了库项目在同一个工作区.
为什么我不能将库项目添加到嵌入式二进制文件?在XCode 6.1中,依赖项目是否正常编译并嵌入到应用程序中而不在任何地方列出或链接是否正常?

我刚刚将Xcode更新为Xcode 8,现在我正在尝试将我的项目代码转换为Swift 2.3.我能够使用Xcode 8构建几次而没有任何错误.现在,出现了以下错误:
ld:找不到文件:/Users/Linus/Library/Developer/Xcode/DerivedData/MyApp-asdjeshhsetnfxbegcsbcipdreneewgr/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/DownloadsViewController.o
clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
我甚至都不知道.o文件是什么.但是,swift文件就DownloadsViewController在那里.
ditto:无法获得源的真实路径'/Users/Linus/Library/Developer/Xcode/DerivedData/MyApp-asdjeshhsetnfxbbciegrfdpdreneewgr/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/ MyApp-Swift.h'
命令/ usr/bin/ditto失败,退出代码为1
出现该错误同上3次:对MyApp.swiftdoc,MyApp.swiftmodule和MyApp-Swift.h.
提前致谢!
我必须链接两个库,比如A和B.一些文件在两个库中都很常见.所以,我在命名空间中声明库A中的函数,比如说abc.因此,在A和B中,函数func如下所示:
[ in A]
namespace abc {
extern "C" void func();
}
[in B]
extern "C" void func();
Run Code Online (Sandbox Code Playgroud)
在构建项目时,编译器抛出链接错误,说明函数func的多个定义.不是命名空间内的A中的函数func,还是extern"C"函数存在一些问题.如果有,那我怎么能区分它们呢?
linker-errors ×10
ios ×4
xcode ×4
c++ ×3
swift ×2
build-tools ×1
c ×1
const ×1
crashlytics ×1
extern ×1
g++ ×1
installation ×1
namespaces ×1
objective-c ×1
project ×1
qt-creator ×1
qt5 ×1
qtwebkit ×1
qwebview ×1
rust ×1
typeinfo ×1
virtual ×1
xcode6 ×1