-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
工程多模块构建失败 #4786
Comments
XBLog.dll 你没导出任何符号,所以没有自动生成 XBLog.lib ,not found了。。跟 xmake 没啥关系。。你自己导出下符号 |
You did not export any symbols for XBLog.dll, so XBLog.lib was not automatically generated and was not found. . It has nothing to do with xmake. . Export the symbols yourself |
首先有导出符号,其次,单独构建模块时:xmake -r XBLog,是可以正常构建的,也有自动生成XBLog.lib |
First, there are exported symbols. Secondly, when building the module separately: xmake -r XBLog can be built normally, and XBLog.lib is also automatically generated. |
单独构建XBLog日志 |
Build XBLog logs separately |
多模块下,XBLog 也构建成功的,跟是否单独没关系,目前看日志,多模块下,就是没有找到 XBLog.lib 你可以看下就没有生成,如果生成了 XBLog.dll 但是没生成 XBLog.lib 。。那就是没有导出符号。。 |
Under multi-module, XBLog is also built successfully. It has nothing to do with whether it is alone. Looking at the logs, under multi-module, XBLog.lib is not found. You can check if it is not generated. If XBLog.dll is generated but XBLog.lib is not generated. . That means no symbols are exported. . |
多模块下,XBLog.lib有生成,XBLog.dll也有文件,但未成功,PS:XBLog.dll不是成功编译好的文件大小 |
Under multi-module, XBLog.lib is generated, and XBLog.dll file is also generated, but it is not successful. PS: XBLog.dll is not the size of the successfully compiled file. |
贴下 xmake.lua 或者给下完整可复现的 example |
Paste xmake.lua or provide a complete and reproducible example. |
找到问题了,是另外一个模块xb_breakpad依赖XBLog,需要引用,脚本中没写依赖,导致编译失败。 |
I found the problem. It is that another module xb_breakpad depends on XBLog and needs to be referenced. The dependency is not written in the script, causing the compilation to fail. |
希望报错可以更精准些,哪个模块出的问题,可以清晰描述出来,这样更容易找问题 |
I hope that the error reporting can be more accurate, and which module has the problem can be clearly described, so that it will be easier to find the problem. |
其实我已经猜到是这个问题,所以刚问你要 xmake.lua 只是想确认下。。用户没有添加依赖关系,xmake 也不可能猜出来他们之间需要有依赖(xmake 是无法预判用户需求的),给出准确的依赖错误。。这种只能自己根据 xmake.lua 和链接器报错,自己分析。。 |
In fact, I have already guessed that this is the problem, so I just asked you for xmake.lua just to confirm. . The user has not added dependencies, and it is impossible for xmake to guess that there are dependencies between them (xmake cannot predict user needs) and give accurate dependency errors. . This can only be analyzed by yourself based on the error reported by xmake.lua and the linker. . |
Xmake 版本
2.8.6
操作系统版本和架构
windows 7
描述问题
vs2013,工程多模块构建失败,单个模块独立构建是正常的。报错如下:
详细log看附件
期待的结果
正常构建
工程配置
工程多模块构建
在xmake.lua中includes多个模块
附加信息和错误日志
log.txt
The text was updated successfully, but these errors were encountered: