首页 \ 问答 \ eclipse无法运行kotlin(JDK 10)(eclipse cannot run kotlin (JDK 10))

eclipse无法运行kotlin(JDK 10)(eclipse cannot run kotlin (JDK 10))

我试图在eclipse IDE中的kotlin中启动新项目,我安装了kotlin成功,并且使用命令行我可以编译和运行kotlin文件。

但在日食中我有一个错误:

The archive: /Kotlin-test-4/kotlin_bin which is referenced by the
classpath, does not exist.

这是我的错误 错误消息

  1. 我试图设置新的项目
  2. 将文件设置为“kotlin文件”和“kotlin类”

eclipse :Oxygen.3a版本(4.7.3a)
java: java 10.0.1 2018-04-17 Java™SE运行时环境18.3(构建10.0.1 + 10)Java HotSpot™64位服务器VM 18.3(构建10.0.1 + 10,混合模式)
kotlin插件版本: 0.8.4


I tried to start new project in kotlin in eclipse IDE, I install kotlin success, and with the command line I can compile and run kotlin files.

but in eclipse I have an error:

The archive: /Kotlin-test-4/kotlin_bin which is referenced by the
classpath, does not exist.

here is my error error messages

  1. I tried to set new project
  2. to set the file to "kotlin file" and "kotlin class"

eclipse: Oxygen.3a Release (4.7.3a)
java: java 10.0.1 2018-04-17 Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
kotlin plugin version: 0.8.4


原文:https://stackoverflow.com/questions/50758889
更新时间:2022-10-20 12:10

最满意答案

缺省情况下,bitbake.conf包含在运行时传递给make命令的EXTRA_OEMAKE =“-e MAKEFLAGS =”(请参阅​​运行$ {MAKE} $ {EXTRA_OEMAKE}“$ @”的base.bbclass)。

-e选项意味着环境变量会覆盖makefile(来自make --help)。 您还会注意到,bitbake.conf在其他几个导出的变量中设置了导出CFLAGS =“$ {TARGET_CFLAGS}”,因此在环境中设置了CFLAGS。

这样做的原因是有一些编译器标志在交叉编译时很重要,一般来说,系统比makefile有更好的使用方法。 这有时会失败,因为你发现。

你可以从EXTRA_OEMAKE中删除-e选项,但是你可能会冒其他关键变量设置不正确的风险(比如它是否会找到交叉编译器)。 另一个稍微干净的解决方案可能是添加到TARGET_CFLAGS,例如:

TARGET_CFLAGS + =“-Wall -std = gnu99”

不幸的是,这里可能没有完美的解决方案,但希望这有助于理解它为什么会这样做。


By default, bitbake.conf contains EXTRA_OEMAKE = "-e MAKEFLAGS=" which is passed to the make command when its run (see base.bbclass, which runs ${MAKE} ${EXTRA_OEMAKE} "$@").

The -e option to make means that environment variables override makefiles (from make --help). You'll also notice that bitbake.conf sets export CFLAGS = "${TARGET_CFLAGS}" amongst several other exported variables, so CFLAGS is set in the environment.

The reason it does this is that there are some compiler flags which are important whilst cross compiling and in general, the system has a better idea of what to use than the makefile does. This does sometimes fail as you've found.

You could remove the -e option from EXTRA_OEMAKE but you run the risk of other key variables not being set correct (e.g. would it find the cross compiler). Another slightly cleaner solution might be to add to TARGET_CFLAGS, e.g.:

TARGET_CFLAGS += "-Wall -std=gnu99"

Unfortunately there is likely no perfect solution here however hopefully this helps understand why it does what it does.

相关问答

更多
  • 如果您的编译器没有 -fno-stack-protector选项,它将返回错误代码(即某些东西!=0 ),否则它将返回0 (返回代码中的“true”),表示一切正常。 现在,表达式foo && bar表示只有在foo返回非错误代码(即0 )时才会执行bar 。 所以,你看,如果你的编译器没有那个标志,它将返回“false”(某些东西!=0 ),并且永远不会执行echo命令。 但如果它有标志,则会执行echo 。 If your compiler does not have the option -fno-s ...
  • CFLAGS_只是一个字符串。 $(CFLAGS_)是一个变量的值。 所以你应该有: CFLAGS += $(CFLAGS_) SRCS-y += $(SRCS-y_) CFLAGS_ is just a string. $(CFLAGS_) is a variable's value. So you should have: CFLAGS += $(CFLAGS_) SRCS-y += $(SRCS-y_)
  • 通过检查文件的时间戳来简化工作。 你几乎不希望每个构建工件依赖于你的Makefile (至少在积极开发它时没有)但是如果你真的想要Make来处理这种依赖,你可以将CFLAGS定义放在辅助文件buildflags.mk ,从主要包含它Makefile ,并使所有目标文件都依赖于buildflags.mk 。 不过,我几乎不认为有人会在实践中真正做到这一点。 总会有这样的情况,确保你获得一个干净的构建的唯一方法是刷新一切并重新开始。 确保您拥有良好且最新的realclean和/或distclean目标,并确保在 ...
  • 缺省情况下,bitbake.conf包含在运行时传递给make命令的EXTRA_OEMAKE =“-e MAKEFLAGS =”(请参阅运行$ {MAKE} $ {EXTRA_OEMAKE}“$ @”的base.bbclass)。 -e选项意味着环境变量会覆盖makefile(来自make --help)。 您还会注意到,bitbake.conf在其他几个导出的变量中设置了导出CFLAGS =“$ {TARGET_CFLAGS}”,因此在环境中设置了CFLAGS。 这样做的原因是有一些编译器标志在交叉编译时 ...
  • 这个makefile使用make的内置规则集来创建对象和链接可执行文件,而不是让你自己输入它们。 Make有一个默认规则,看起来(或多或少)像这样: %.o : %.c $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 如果您没有自己指定任何规则来构建.o并且需要构建一个并且它有一个.c ,它将使用默认的内置规则。 所以,你的问题的答案是,“把CFLAGS的任命放在你想要的任何地方”。 无论您将它放在何处,它都将由默认规则使用。 This makefile i ...
  • 我认为ifeq块不应该进入make目标,而应该进入makefile的前面(在所有:)之前。 就是这样: OS:=$(shell uname) DST=hello SRC=$(wildcard *.cpp) OBJ=$(SRC:.cpp=.o) CFLAGS= ifeq ($(OS),Darwin) $(info OS is $(OS)) CC=g++ LDFLAGS=-lm -framework OpenCL CFLAGS+=-O3 endif ifeq ($(OS),L ...
  • 我在编译C ++文件时使用CFLAGS ,在编译C ++文件时使用CXXFLAGS 。 除了CFLAGS和CXXFLAGS之外,您可能还缺少另一个相关变量: CPPFLAGS 。 我应该在CXXFLAGS或CFLAGS添加-I eigen吗? CPPFLAGS通常用于提供与预处理器相关的选项。 我会使用此变量来指定包含目录: CPPFLAGS = -I eigen 另一个有趣的变量是提供库,它将是LDLIBS 。 您可以利用它来传递-lm : LDLIBS = -lm 我应该更改为$(PROGRAM): ...
  • 你的规则是 %.o: %.c $(DEPS) 但你正在编译一个.cpp文件。 将使用.cpp源文件的隐式make规则。 请将您的规则更改为 %.o: %.cpp $(DEPS) 或者设置隐式规则中使用的CXXFLAGS变量。 Your rule is %.o: %.c $(DEPS) but you are compiling a .cpp file. The implicit make rule for .cpp source files will be used. Either change yo ...
  • 看起来你正在编译C ++,在这种情况下,要使用的变量是AM_CXXFLAGS 。 设置AM_CXXFLAGS应该在Makefile.am ,它声明你正在编译的东西(即bin_PROGRAMS , lib_LTLIBRARIES ,...)。 如果您在重复自己,请不要忘记automake支持include语句。 递归使被认为是有害的。 现代automake支持subdir-objects 。 如果一个Makefile.am失控,请使用include语句。 打开libtool的现代方法是LT_INIT ,而不是 ...
  • 最简单的方法可能是在实际构建时使用make : make CFLAGS=-O0 这对于那个版本来说只是暂时的,它不会是永久性的。 The simplest way might be to do it when actually building, using make: make CFLAGS=-O0 That's only temporary for that build though, it won't be permanent.

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。