我正在尝试将VS2012中编写的项目迁移到VS2013.
我成功编译了boost 1.53.0(我首先尝试了1.54.0,但得到了一些编译器错误)并得到了类似的库
libboost_filesystem-vc120-mt-1_53.lib.
但是在尝试构建我的项目时,链接器抱怨:
error LNK1104: cannot open file 'libboost_filesystem-vc110-mt-1_53.lib'
Run Code Online (Sandbox Code Playgroud)
我一直在寻找一些项目设置在我的整个解决方案中找出,为什么它试图加载旧的库版本,但我没有找到任何东西.
链接器如何知道要使用哪个库?我该如何解决我的问题?
我的代码就像一个文本压缩器,读取普通文本并变成数字,每个单词都有一个数字.它在DevC++中编译但不会结束,但是它不能在Ubuntu 13.10中编译.我收到的错误就像Ubuntu中的标题"未定义引用`strlwr'",我的代码有点长,所以我无法在这里发布,但其中一个错误来自:
//operatinal funcitons here
int main()
{
int i = 0, select;
char filename[50], textword[40], find[20], insert[20], delete[20];
FILE *fp, *fp2, *fp3;
printf("Enter the file name: ");
fflush(stdout);
scanf("%s", filename);
fp = fopen(filename, "r");
fp2 = fopen("yazi.txt", "w+");
while (fp == NULL)
{
printf("Wrong file name, please enter file name again: ");
fflush(stdout);
scanf("%s", filename);
fp = fopen(filename, "r");
}
while (!feof(fp))
{
while(fscanf(fp, "%s", textword) == 1)
{
strlwr(textword);
while (!ispunct(textword[i]))
i++;
if (ispunct(textword[i]))
{
i = 0; …Run Code Online (Sandbox Code Playgroud) 所以我的程序运行正常.编译,链接,运行,工作.然后,我决定在我的一个文件中添加一个简单的函数,如下所示:
#ifndef UTILITY_HPP
#define UTILITY_HPP
/* #includes here. There's no circular include, I've checked. */
namespace yarl
{
namespace utility
{
(several function declarations and definitions)
bool isVowel(const char c)
{
if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u')
return true;
else return false;
}
}
}
#endif
Run Code Online (Sandbox Code Playgroud)
该函数定义是我对代码所做的唯一更改.其他一切与现在完全一样.什么都没有叫它.我编译,它无法链接,g ++为#includes这个文件的每个文件提供了这些错误之一:
./obj/Feature.o: In function `yarl::utility::isVowel(char)':
/home/max/Desktop/Development/Yarl Backup/yarl v0.27/src/Utility.hpp:130: multiple definition of `yarl::utility::isVowel(char)'
./obj/Events.o:/home/max/Desktop/Development/Yarl Backup/yarl v0.27/src /Utility.hpp:130: first defined here
./obj/GameData.o: …Run Code Online (Sandbox Code Playgroud) 首先,我在编程中只使用了Objective-c方法.我决定做几个快速的数学计算作为c函数,然后最终需要它们用于多个类.所以我把c函数放在一个单独的.h文件中.这工作正常,直到我尝试将.h文件导入多个类.然后我收到这个错误:
重复符号*_myFunction*blah blah blah链接器命令失败,退出代码为1(使用-v查看调用)
如何在没有此链接错误的情况下在多个类中使用ac函数.我试过在我需要的类中定义函数,但似乎即使它们是不同的类,如果函数名相同,我也会得到这个错误.我在这里可能很疯狂,但有些帮助理解会很棒.
我正在尝试将iOS版Google转化跟踪功能添加到我的iPhone应用中.该应用程序的基础SDK是iOS6应用程序的有效架构是armv7,armv7s应用程序的iOS部署目标是4.3我使用的是最新的xcode 4.5.2和OSX 10.8.2
该应用程序位于appstore中,适用于iPhone 3-4-5
当我尝试按以下链接添加适用于iOS的Google转化跟踪时:https://developers.google.com/mobile-ads-sdk/docs/admob/conversion-tracking
我有这个错误:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleConversionTracking.a(PingUtil.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud) 我一直在尝试编译一个程序dbus,正如我在代码中提到的那样,提到了类似的问题.我按照图示执行了它:
gcc `pkg-config --cflags dbus-glib-1` \
`pkg-config --cflags dbus-1` \
`pkg-config --cflags glib-2.0` \
dbus-example.c \
`pkg-config --libs dbus-glib-1` \
`pkg-config --libs dbus-1` \
`pkg-config --libs glib-2.0`
Run Code Online (Sandbox Code Playgroud)
我仍然收到以下错误:
Package dbus-glib-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-glib-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-glib-1' found
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable …Run Code Online (Sandbox Code Playgroud) 与libc ++一起使用clang时,为什么会出现以下链接器错误:
$ clang++ -stdlib=libc++ po.cxx -lpoppler
/tmp/po-QqlXGY.o: In function `main':
po.cxx:(.text+0x33): undefined reference to `Dict::lookup(char*, Object*, std::__1::set<int, std::__1::less<int>, std::__1::allocator<int> >*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
哪里:
$ nm -D /usr/lib/x86_64-linux-gnu/libpoppler.so | grep lookup | c++filt| grep \ Dict::lookup\(
00000000000c1870 T Dict::lookup(char*, Object*, std::set<int, std::less<int>, std::allocator<int> >*)
Run Code Online (Sandbox Code Playgroud)
代码很简单:
#include <poppler/PDFDoc.h>
int main()
{
Dict *infoDict;
Object obj;
infoDict->lookup((char*)"key", &obj);
return 0;
}
Run Code Online (Sandbox Code Playgroud) 我正在使用XCTest和Xcode 5进行单元测试.一切都工作得很好,但随后一位同事推动了,它似乎打破了它.
我做了以下事情:
BUNDLE_LOADER = $(BUILT_PRODUCTS_DIR)/ app name.app/app
TEST_HOST = $(BUNDLE_LOADER)
我无休止地玩弄了构建路径.
这是我得到的错误,它与Linker-O错误有关.
-bundle_loader只能与-bundle一起使用
有人知道怎么修这个东西吗?
我已经搜索了SO和谷歌,但无法找到有效的答案.我在多个项目中使用了新的Firebase Cocoapod,但是现在,当将它添加到另一个项目时,我收到以下错误.
我正在使用Xcode 7.3.1和cocoapods 1.0.1.
任何帮助是极大的赞赏!
有人可以帮帮我吗?一切都在我的项目上工作正常,但在更新到Xcode10 Beta5后,我在尝试在iPhone上运行应用程序时出现此错误.然而模拟器工作......请帮助我!!!
我已经对这个问题进行了网络搜索并找到了这个帖子.我尝试了所有的答案但没有奏效.
如果你遇到这个问题我会非常感谢你能帮助我再次在我的iPhone上运行我的应用程序