蚂蚁/使汇编错误与有空间的文件路径

发布于 2025-02-11 22:29:43 字数 1266 浏览 1 评论 0原文

无法生产一些MVC来复制该问题。因此,要清楚&简洁的。

  1. 我们利用蚂蚁/make

  2. 包括构建C ++部分的途径,利用Java安装目录的标题(JNI.H)

示例错误(在构建过程中)

3) 3)

*File.h(2): fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
make: *** [File.obj] Error 2*

还显示了另一个错误是:

cl : Command line warning D9024 : unrecognized source file type 'Files\Java\jdk1.8.0_281\include', object file assumed

cl : Command line warning D9027 : source file 'Files\Java\jdk1.8.0_281\include' ignored

cl : Command line warning D9024 : unrecognized source file type 'Files\Java\jdk1.8.0_281\include\win32', object file assumed

cl : Command line warning D9027 : source file 'Files\Java\jdk1.8.0_281\include\win32' ignored
  1. 这是包括路径作为汇编步骤的一部分(是的,此路径存在) -IC:\ Program Files \ Java \ JDK1.8.0_281 \ Inclupper

  2. 现在,当我将所需的文件复制为一个称为programFiles \ java的路径...(programfiles中没有空格)它可以正常工作。

  3. 我有一个从.platform文件中检索的变量,该文件用于构建,该文件定义了JDK_HOME。我相信此文件用于ant/构建构建,并在此文件中使用这些定义的变量。

关于蚂蚁的想法/途径,或者不喜欢包含路径或沿这些线路的任何东西吗?我在网上查看了许多资源,但是很难描述这个问题。

问题显然是程序文件中的空间。不知道这有什么意义。

希望这些问题可以帮助任何可能熟悉此问题或可能有潜在客户的人所需的任何信息。谢谢。

Unable to produce some MVC to reproduce the issue. So trying to be clear & concise.

  1. We utilize ant/make

  2. The include path to building the C++ portion utilizes a header (jni.h) from the java installed directory

Example Error (During Build Process)

3)

*File.h(2): fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
make: *** [File.obj] Error 2*

Another error also shown is:

cl : Command line warning D9024 : unrecognized source file type 'Files\Java\jdk1.8.0_281\include', object file assumed

cl : Command line warning D9027 : source file 'Files\Java\jdk1.8.0_281\include' ignored

cl : Command line warning D9024 : unrecognized source file type 'Files\Java\jdk1.8.0_281\include\win32', object file assumed

cl : Command line warning D9027 : source file 'Files\Java\jdk1.8.0_281\include\win32' ignored
  1. This is the include path as part of the compilation step (Yes this path exists) -IC:\Program Files\Java\jdk1.8.0_281\include

  2. Now when I copy the files necessary to a path that's called ProgramFiles\Java... (No spaces in ProgramFiles) it works fine.

  3. I have a variable retrieved from a .platform file which is utilized for the build, which defines JDK_HOME. I believe this file is utilized for ant/make builds and uses these defined variables in this file.

Any ideas/paths as to ant or make not liking spaces in the include paths, or anything along those lines? I've looked at many resources online, but very hard to describe the issue.

Problem clearly is the space in Program Files. Not sure what is so significant about this.

Hoping the bullet points help in any information needed with anyone who could be familiar with this issue or might have leads. Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦在深巷 2025-02-18 22:29:43

我不确定蚂蚁与这有什么关系。但是,制作配方只是Shell脚本(或者,如果您使用Windows CMD.EXE而不是Posix Shell,则是批处理文件)。就像您要在批处理文件或命令行中写入的命令一样,您必须将引用添加到包含空格的路径中。

您实际上并没有向我们展示制作食谱,甚至没有向我们展示制作调用的完整编译(cl)命令行,因此我们不能提供精确的建议,但是基本上,如果您剪切并粘贴命令Line将调用到您的终端提示中,您会得到有关空格的完全相同的错误。 make不是魔术:它只能运行您告诉它运行的命令。

就像您在从终端提示符中运行时要添加包含空格的路径的报价一样,当您从Makefile配方运行时,您也需要在这些路径上添加引号。

I'm not sure what ant has to do with this. But make recipes are just shell scripts (or, if you use Windows cmd.exe instead of a POSIX shell, batch files). Just like commands you'd write in a batch file or on the command line directly, you have to add quoting to paths that contain whitespace.

You don't actually show us either the make recipe or even the complete compile (cl) command line that make invokes so we can't give you precise advice, but basically if you cut and paste the command line make invoked into your terminal prompt you'd get exactly the same errors about whitespace. Make is not magic: it only runs the commands you tell it to run.

Just like you have to add quotes around paths containing whitespace when you run them from the terminal prompt, so too you need to add quotes to these paths when you run them from a makefile recipe.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文