Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error adding package #1380

Closed
xq114 opened this issue May 4, 2021 · 1 comment
Closed

Error adding package #1380

xq114 opened this issue May 4, 2021 · 1 comment
Labels
Milestone

Comments

@xq114
Copy link
Contributor

xq114 commented May 4, 2021

注:提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没有根据下面的模板给出任何相关辅助信息的,将会直接标记为Invalid。

描述问题

add_packages失败

minimal example:

xmake.lua
main.cpp

xmake.lua

add_requires("eigen", "libigl")
target("test")
	set_kind("static")
	add_files("main.cpp")
	add_packages("eigen")

main.cpp

#include <Eigen/Dense>

期待的结果

正常编译

错误信息

如果可能,请尽量附加程序运行过程中的错误输出信息。

[ 25%]: compiling.release main.cpp
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\cl.exe" -c /EHsc -nologo -Ox -fp:fast -DNDEBUG -Fobuild\.objs\test\windows\x64\release\main.cpp.obj main.cpp
error: @programdir\modules\private\async\runjobs.lua:217: @programdir\modules\private\action\build\object.lua:78: @programdir\modules\core\tools\cl.lua:447: main.cpp
main.cpp(1): fatal error C1083: Cannot open include file: 'Eigen/Dense': No such file or directory

相关环境

请提供编译和运行环境信息,下面是一些必须填写的基础信息,便于我们针对性排查问题:

  • xmake版本:2.5.3 dev
  • xmake运行平台:windows
  • xmake目标平台:windows

其他信息

去掉requires里面的libigl就可以正常编译了;libigl依赖eigen,推测与这个有关

@waruqi
Copy link
Member

waruqi commented May 4, 2021

package:is_toplevel 的判断实现有点问题导致,我刚修复了。可以再试试

@waruqi waruqi added the bug label May 4, 2021
@waruqi waruqi added this to the v2.5.4 milestone May 4, 2021
@xq114 xq114 closed this as completed May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants