Giter VIP home page Giter VIP logo

Comments (19)

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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:
image
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

log.txt

from xmake.

waruqi avatar waruqi commented on August 28, 2024

XBLog.dll 你没导出任何符号,所以没有自动生成 XBLog.lib ,not found了。。跟 xmake 没啥关系。。你自己导出下符号

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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.

rooong avatar rooong commented on August 28, 2024

首先有导出符号,其次,单独构建模块时:xmake -r XBLog,是可以正常构建的,也有自动生成XBLog.lib

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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.

rooong avatar rooong commented on August 28, 2024

单独构建XBLog日志
log2.txt

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

Bot detected the issue body's language is not English, translate it automatically.


Build XBLog logs separately
log2.txt

from xmake.

waruqi avatar waruqi commented on August 28, 2024

首先有导出符号,其次,单独构建模块时:xmake -r XBLog,是可以正常构建的,也有自动生成XBLog.lib

多模块下,XBLog 也构建成功的,跟是否单独没关系,目前看日志,多模块下,就是没有找到 XBLog.lib

你可以看下就没有生成,如果生成了 XBLog.dll 但是没生成 XBLog.lib 。。那就是没有导出符号。。

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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.

rooong avatar rooong commented on August 28, 2024

首先有导出符号,其次,单独构建模块时:xmake -r XBLog,是可以正常构建的,也有自动生成XBLog.lib

多模块下,XBLog 也构建成功的,跟是否单独没关系,目前看日志,多模块下,就是没有找到 XBLog.lib

你可以看下就没有生成,如果生成了 XBLog.dll 但是没生成 XBLog.lib 。。那就是没有导出符号。。

多模块下,XBLog.lib有生成,XBLog.dll也有文件,但未成功,PS:XBLog.dll不是成功编译好的文件大小

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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.

waruqi avatar waruqi commented on August 28, 2024

贴下 xmake.lua 或者给下完整可复现的 example

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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.

rooong avatar rooong commented on August 28, 2024

找到问题了,是另外一个模块xb_breakpad依赖XBLog,需要引用,脚本中没写依赖,导致编译失败。
但是目前给的log,很难明了的知道问题点。而且遇到了这个问题,.xmake需要删掉重新编译,不然再次重新编译,链接时会报另外一个错误:
linker.lua:33: cannot get program for ar
也非常不友好,搞不明白实际的问题点

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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.

rooong avatar rooong commented on August 28, 2024

希望报错可以更精准些,哪个模块出的问题,可以清晰描述出来,这样更容易找问题

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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.

waruqi avatar waruqi commented on August 28, 2024

其实我已经猜到是这个问题,所以刚问你要 xmake.lua 只是想确认下。。用户没有添加依赖关系,xmake 也不可能猜出来他们之间需要有依赖(xmake 是无法预判用户需求的),给出准确的依赖错误。。这种只能自己根据 xmake.lua 和链接器报错,自己分析。。

from xmake.

Issues-translate-bot avatar Issues-translate-bot commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.