Comments (19)
Bot detected the issue body's language is not English, translate it automatically.
Title: Project multi-module build failed
Xmake version
2.8.6
Operating system version and architecture
Windows 7
Describe the problem
In vs2013, the multi-module construction of the project failed. It is normal for a single module to be built independently. The error is reported as follows:
See attachment for detailed log
Expected results
Build normally
Project configuration
Engineering multi-module construction
Include multiple modules in xmake.lua
Additional information and error logs
from xmake.
XBLog.dll 你没导出任何符号,所以没有自动生成 XBLog.lib ,not found了。。跟 xmake 没啥关系。。你自己导出下符号
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
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
from xmake.
首先有导出符号,其次,单独构建模块时:xmake -r XBLog,是可以正常构建的,也有自动生成XBLog.lib
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
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.
from xmake.
单独构建XBLog日志
log2.txt
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
Build XBLog logs separately
log2.txt
from xmake.
首先有导出符号,其次,单独构建模块时:xmake -r XBLog,是可以正常构建的,也有自动生成XBLog.lib
多模块下,XBLog 也构建成功的,跟是否单独没关系,目前看日志,多模块下,就是没有找到 XBLog.lib
你可以看下就没有生成,如果生成了 XBLog.dll 但是没生成 XBLog.lib 。。那就是没有导出符号。。
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
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.
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. .
from xmake.
首先有导出符号,其次,单独构建模块时:xmake -r XBLog,是可以正常构建的,也有自动生成XBLog.lib
多模块下,XBLog 也构建成功的,跟是否单独没关系,目前看日志,多模块下,就是没有找到 XBLog.lib
你可以看下就没有生成,如果生成了 XBLog.dll 但是没生成 XBLog.lib 。。那就是没有导出符号。。
多模块下,XBLog.lib有生成,XBLog.dll也有文件,但未成功,PS:XBLog.dll不是成功编译好的文件大小
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
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.
Under multi-module, XBLog is also built successfully. It has nothing to do with whether it is alone. Looking at the logs, XBLog.lib is not found under multi-module.
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. .
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.
from xmake.
贴下 xmake.lua 或者给下完整可复现的 example
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
Paste xmake.lua or provide a complete and reproducible example.
from xmake.
找到问题了,是另外一个模块xb_breakpad依赖XBLog,需要引用,脚本中没写依赖,导致编译失败。
但是目前给的log,很难明了的知道问题点。而且遇到了这个问题,.xmake需要删掉重新编译,不然再次重新编译,链接时会报另外一个错误:
linker.lua:33: cannot get program for ar
也非常不友好,搞不明白实际的问题点
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
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.
But with the log provided so far, it’s difficult to clearly understand the problem. And if you encounter this kind of problem, .xmake needs to be deleted and recompiled, otherwise another error will be reported during linking:
linker.lua:33: cannot get program for ar
They are also very unfriendly and cannot understand the actual problem.
from xmake.
希望报错可以更精准些,哪个模块出的问题,可以清晰描述出来,这样更容易找问题
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
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.
from xmake.
其实我已经猜到是这个问题,所以刚问你要 xmake.lua 只是想确认下。。用户没有添加依赖关系,xmake 也不可能猜出来他们之间需要有依赖(xmake 是无法预判用户需求的),给出准确的依赖错误。。这种只能自己根据 xmake.lua 和链接器报错,自己分析。。
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
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. .
from xmake.
Related Issues (20)
- Native XCode project generator plugin
- Module object files are not built since v2.8.7 HOT 4
- 添加 target:gb2312 以满足中文兼容性 HOT 5
- 增加能够在 rule 中传递的用户级自定义变量的功能 HOT 5
- 创建 cmakelist 异常 HOT 5
- Support range based glob pattern HOT 5
- add_requireconfs 固定依赖版本后丢失依赖信息 HOT 21
- flex应该能正常单独使用 HOT 3
- package budil with android ndk use cmake_generator=Ninja failed on windows HOT 2
- in package config setting "-DANDROID_PLATFORM=XXX" is override by xmake ndk toolchain HOT 1
- 大型项目用 xmake 构建的最佳实践? HOT 10
- ubuntu下调用xmake f --menu报错error: field 'isdone' is not callable (a nil value) HOT 7
- Allow target:fileconfig() for headerfiles HOT 8
- new version xmake can not build static lib only containing modules HOT 7
- package:add_linkdirs() 未导出 HOT 11
- xmake中如何添加配置g++ -Wl,-rpath=. HOT 2
- Dependencies are built after precompiled headers HOT 3
- Endianness/Byte-order detection on build machine HOT 2
- Metal project generated by xmake can not launch because of failed to load default library HOT 1
- xmake test 并发测试用例时输出进度乱序, 希望排序后输出 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmake.