Tag: 编译器错误

XCode 4.1致命错误:自编译预编译头之后,修改了stdlib

build立一个iPhone应用程序,使用: XCode 4.1 基础SDK iOS 4.3 苹果LLVM编译器2.1 我已经开始得到以下错误: 致命错误:文件'/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/../lib/clang/2.1/include/stdint.h'已经被修改,因为预编译的头文件被创build 我已经尝试重新安装XCode和OS X – 没有运气。 任何人都知道这是什么原因?

为什么这个Java 8 lambda无法编译?

以下Java代码无法编译: @FunctionalInterface private interface BiConsumer<A, B> { void accept(A a, B b); } private static void takeBiConsumer(BiConsumer<String, String> bc) { } public static void main(String[] args) { takeBiConsumer((String s1, String s2) -> new String("hi")); // OK takeBiConsumer((String s1, String s2) -> "hi"); // Error } 编译器报告: Error:(31, 58) java: incompatible types: bad return type in […]

如何查看IntelliJ中编译错误的列表?

我正在寻找一种方法来查看IntelliJ中的所有编译错误,类似于它们在Eclipse中的显示方式。 我试图在这里search和谷歌,但还没有真正find解决scheme。 我真的很喜欢IntelliJ,我最近从Eclipse转换到了它,我希望这只是我缺less的东西,而不是一个根本的缺陷。

Swift编译器错误:string连接上的“expression式太复杂”

我觉得这很有趣。 我已经修好了,但是我想知道原因。 这里是错误: DataManager.swift:51:90: Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions DataManager.swift:51:90: Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions 。 为什么抱怨? 这似乎是最简单的expression式之一。 编译器指向columns + ");"; 部分 func tableName() -> String { return("users"); } […]

在安装python时,在$ PATH中找不到可接受的C编译器

我试图在我的共享主机上安装新的Python环境。 我按照这个post写的步骤: mkdir ~/src wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz tar -zxvf Python-2.7.1.tar.gz cd Python-2.7.1 mkdir ~/.localpython ./configure –prefix=/home/<user>/.localpython make make install 来到“./configure –prefix = / home //。localpython”命令后,我得到以下输出: checking for –enable-universalsdk… no checking for –with-universal-archs… 32-bit checking MACHDEP… linux3 checking EXTRAPLATDIR… checking machine type as reported by uname -m… x86_64 checking for –without-gcc… no checking for gcc… no checking […]

为什么C#编译器不是静态方法调用实例方法的错误代码?

下面的代码有一个静态方法Foo() ,调用一个实例方法Bar() : public sealed class Example { int count; public static void Foo( dynamic x ) { Bar(x); } void Bar( dynamic x ) { count++; } } 它编译没有错误*,但在运行时生成运行时绑定exception。 正如所料,删除这些方法的dynamic参数会导致编译器错误。 那么为什么有一个dynamic参数允许编译代码? ReSharper也不会将其显示为错误。 在Visual Studio 2008中编辑1: * 编辑2:添加sealed因为子类可能包含静态Bar(…)方法。 即使是密封的版本,也可以在运行时调用实例方法以外的方法。

GCC编译错误> 2 GB的代码

我有大量的函数总共大约2.8 GB的目标代码(不幸的是,没有办法,科学计算…) 当我尝试链接它们,我得到(预期) relocation truncated to fit: R_X86_64_32S错误,我希望通过指定编译器标志-mcmodel=medium规避。 除了我所控制的链接之外,所有链接库都使用-fpic标志进行编译。 尽pipe如此,错误仍然存​​在,我假设我链接到的一些库不是用PIC编译的。 这是错误: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start': (.text+0x12): relocation truncated to fit: R_X86_64_32S against symbol `__libc_csu_fini' defined in .text section in /usr/lib64/libc_nonshared.a(elf-init.oS) /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start': (.text+0x19): relocation truncated to fit: R_X86_64_32S against symbol `__libc_csu_init' defined in .text section in /usr/lib64/libc_nonshared.a(elf-init.oS) /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined […]

Invoke调用中的匿名方法

对于我们想在Control.Invoke中匿名调用委托的语法有点麻烦。 我们尝试了一些不同的方法,都无济于事。 例如: myControl.Invoke(delegate() { MyMethod(this, new MyEventArgs(someParameter)); }); someParameter是本地方法 以上将导致编译器错误: 无法将匿名方法转换为键入“System.Delegate”,因为它不是委托types

为什么我可以传递1作为一个简短的,而不是我的intvariables?

为什么第一个和第二个写入工作,但不是最后一个? 有没有办法,我可以允许所有3个,并检测是否是1,(int)1或我通过? 真的为什么一个允许,但最后? 第二个被允许,但不是最后一个真的打动了我的脑海。 演示显示编译错误 using System; class Program { public static void Write(short v) { } static void Main(string[] args) { Write(1);//ok Write((int)1);//ok int i=1; Write(i);//error!? } }

ImportError:没有模块命名请求

每当我尝试导入requests ,我得到一个错误,说No module Named requests 。 import requests 我得到的错误: File "ex2.py", line 1, in <module> import requests ImportError: No module named requests