Comments (18)
try use moduleonly
instead of static
add_rules("mode.release", "mode.debug")
set_languages("c++23")
-- Without the static library target, no errors occur
target("x-lib")
set_kind("moduleonly")
add_files("cpp/Math/**.mpp")
target("x-app")
set_kind("binary")
add_files("cpp/*.cpp")
add_deps("x-lib")
from xmake.
Ok, for this minimal example project, it works. But for a bigger project that adds dependencies (libsdl, opengl, etc), everything compiles, but I got a lot of linker errors
$ xmake
generating config/x_config.hpp.in ... ok
generating config/app1_config.hpp.in ... ok
[ 0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[ 0%]: <app1> generating.module.deps cpp/x_lib/Math/Vector.mpp
[ 0%]: <papa> generating.module.deps cpp/x_lib/Math/Vector.mpp
[ 0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[ 0%]: <app2> generating.module.deps cpp/x_lib/Math/Vector.mpp
[ 15%]: cache compiling.debug cpp/third_party/glad/glad.c
[ 20%]: archiving.debug libglad.a
[ 55%]: <app1> compiling.module.debug Vector
[ 60%]: <app2> compiling.module.debug Vector
[ 70%]: compiling.debug cpp/apps/App1/app1.cpp
[ 80%]: compiling.debug cpp/apps/App2/app2.cpp
[ 85%]: linking.debug app1_linux_x86_64-debug
error: /usr/bin/ld: /tmp/ccWpcfNw.ltrans0.ltrans.o: in function `std::vformat(std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >)':
/usr/include/c++/14/format:2773:(.text+0xb9a): undefined reference to `std::span<char, 18446744073709551615ul>::span<256ul>(char (&) [256ul]) [clone .localalias]'
/usr/bin/ld: /tmp/ccWpcfNw.ltrans0.ltrans.o: in function `std::vprint_nonunicode(_IO_FILE*, std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >)':
/usr/include/c++/14/format:2773:(.text+0xdbd): undefined reference to `std::span<char, 18446744073709551615ul>::span<256ul>(char (&) [256ul]) [clone .localalias]
And a lot of undefined references to SDL
undefined reference to `SDL_Init' ... etc
The target in the project:
target("glad")
-- Static library
set_kind("static")
-- Add source files
add_files("cpp/third_party/glad/glad.c")
-- Add path to headers
add_includedirs("cpp/third_party/glad", { public = true })
target("x")
-- Static library
set_kind("moduleonly") -- try use moduleonly instead of static
set_suffixname("-static_$(plat)_$(arch)-$(mode)")
add_files("cpp/papa_lib/**.mpp") -- "cpp/papa_lib/**.cpp", <- removed 1st param here
set_version("0.0.1", { build = "%Y%m%d%H%M" })
set_configdir("$(buildir)/config")
add_configfiles("config/x_config.hpp.in")
-- Link against the required libraries
add_packages("libsdl")
--add_packages("libsdl_mixer")
add_packages("opengl")
-- Add compiled glad library as a dependency
add_deps("glad")
--add_packages("openal-soft")
--add_packages("zlib")
-- Platform specific things
-- if is_plat("linux", "macosx") then
-- add_links("pthread", "m", "dl")
-- end
-- Add public include directories
-- So the engine and apps can find engine headers
add_includedirs("$(projectdir)/cpp", { public = true })
-- So the engine and apps can also find the config headers
add_includedirs("$(buildir)", { public = true })
Can C++20 modules be used to make a static library? I hope so
Running xmake -vD
adds this output:
error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/debug/app1_linux_x86_64-debug build/.objs/app1/linux/x86_64/debug/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/debug/cpp/x_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/debug -lglad -flto -O0) failed(1)
stack traceback:
[C]: in function 'error'
[@programdir/core/base/os.lua:973]:
[@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
[@programdir/modules/core/tools/gcc.lua:580]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]:
[@programdir/core/tool/linker.lua:221]: in function 'link'
[@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
[@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
[@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
[@programdir/actions/build/kinds/binary.lua:83]:
[@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
[@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
[@programdir/modules/async/runjobs.lua:238]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]: in function 'trycall'
[@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
[@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
[@programdir/core/base/scheduler.lua:406]:
stack traceback:
[C]: in function 'error'
@programdir/core/base/os.lua:973: in function 'os.raiselevel'
(...tail calls...)
@programdir/core/main.lua:329: in upvalue 'cotask'
@programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>
from xmake.
Can C++20 modules be used to make a static library? I hope so
when only module files exsit, please use moduleonly. when both module/cpp or only cpp files exsit, please use static.
https://github.com/xmake-io/xmake/blob/master/tests/projects/c%2B%2B/static_library/xmake.lua
And I did not find add_requires
in your xmake.lua
from xmake.
I've tried to make a minimal version of my project file, here it is the complete code
xmake.lua
set_project("something")
-- set_policy("build.optimization.lto", true) -- disabled now
-- Global settings
set_languages("c++23")
set_warnings("allextra")
set_exceptions("cxx")
set_encodings("utf-8")
-- Build modes
add_rules("mode.debug", "mode.release")
if is_mode("debug") then
set_symbols("debug")
set_optimize("none")
end
if is_mode("release") then
set_symbols("hidden")
set_strip("all")
set_optimize("faster")
end
-- Install/fetch the required libraries
add_requires("libsdl")
add_requires("opengl")
-- glad target
target("glad")
set_kind("static")
add_files("cpp/third_party/glad/glad.c")
add_includedirs("cpp/third_party/glad", { public = true })
-- target for my engine as a library
target("my_lib")
set_kind("moduleonly")
set_suffixname("-static_$(plat)_$(arch)-$(mode)")
add_files("cpp/my_lib/**.mpp")
set_version("0.0.1", { build = "%Y%m%d%H%M" })
-- Link against the required libraries
add_packages("libsdl")
add_packages("opengl")
add_deps("glad")
-- Add public include directories
-- So the engine and apps can find engine headers
add_includedirs("$(projectdir)/cpp", { public = true })
-- Apps
target("app1")
set_kind("binary")
set_suffixname("_$(plat)_$(arch)-$(mode)")
add_files("cpp/apps/App1/**.cpp")
add_deps("my_lib")
set_rundir("$(projectdir)/data/App1")
set_version("0.1.2", { build = "%Y%m%d%H%M" })
target("app2")
set_kind("binary")
set_suffixname("_$(plat)_$(arch)-$(mode)")
add_files("cpp/apps/App2/**.cpp")
add_deps("my_lib")
set_rundir("$(projectdir)/data/App2")
set_version("0.2.5", { build = "%Y%m%d%H%M" })
Output is
$ xmake
[ 0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[ 0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[ 0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 15%]: cache compiling.debug cpp/third_party/glad/glad.c
[ 20%]: archiving.debug libglad.a
[ 55%]: <app1> compiling.module.debug Vector
[ 60%]: <app2> compiling.module.debug Vector
[ 70%]: compiling.debug cpp/apps/App1/app1.cpp
[ 80%]: compiling.debug cpp/apps/App2/app2.cpp
[ 85%]: linking.debug app1_linux_x86_64-debug
error: /usr/bin/ld: /tmp/ccSfvoo2.ltrans0.ltrans.o: in function `std::vformat(std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >)':
And a lot more of link errors
Using -vD parameter:
$ xmake -vD
error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/debug/app1_linux_x86_64-debug build/.objs/app1/linux/x86_64/debug/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/debug/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/debug -lglad -flto -O0) failed(1)
stack traceback:
[C]: in function 'error'
[@programdir/core/base/os.lua:973]:
[@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
[@programdir/modules/core/tools/gcc.lua:580]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]:
[@programdir/core/tool/linker.lua:221]: in function 'link'
[@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
[@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
[@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
[@programdir/actions/build/kinds/binary.lua:83]:
[@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
[@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
[@programdir/modules/async/runjobs.lua:238]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]: in function 'trycall'
[@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
[@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
[@programdir/core/base/scheduler.lua:406]:
stack traceback:
[C]: in function 'error'
@programdir/core/base/os.lua:973: in function 'base/os.raiselevel'
(...tail calls...)
@programdir/core/main.lua:329: in upvalue 'cotask'
@programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>
cpp/apps/App1/app1.cpp
#include <iostream>
using std::cout;
using std::endl;
#include <print>
#include <SDL2/SDL.h>
#include <glad/glad.h>
// Import my Vector module ?
import Vector;
int main()
{
std::println(" - system RAM: {} GB", SDL_GetSystemRAM() / 1'000);
// Testing my module!
my_lib::Vector2f v1{ 2.5f, 3.1f };
v1.print();
// Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0)
{
//cout << "Error: " << SDL_GetError() << endl;
std::println("Error: {}", SDL_GetError());
return 1;
}
// Create a window
SDL_Window* window = SDL_CreateWindow("App1",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
1280, 720,
SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
if (!window)
{
SDL_Quit();
std::println("Error creating window: {}", SDL_GetError());
return 1;
}
// Create OpenGL context
auto context = SDL_GL_CreateContext(window);
// Initialize the GLAD library
// https://github.com/Dav1dde/glad
auto glad_version = gladLoadGLLoader(SDL_GL_GetProcAddress);
if (glad_version == 0)
{
SDL_GL_DeleteContext(context);
SDL_DestroyWindow(window);
SDL_Quit();
cout << "Error initializing GLAD library!" << endl;
return 1;
}
cout << " - glad library initialized" << endl;
cout << " - Vendor: " << glGetString(GL_VENDOR) << endl;
cout << " - Renderer: " << glGetString(GL_RENDERER) << endl;
cout << " - Version: " << glGetString(GL_VERSION) << endl;
// Loop
bool close = false;
while (!close)
{
SDL_Event event;
while (SDL_PollEvent (&event))
{
if (event.type == SDL_QUIT)
close = true;
}
// draw
glClear(GL_COLOR_BUFFER_BIT);
SDL_GL_SwapWindow(window);
}
// Destroy
SDL_GL_DeleteContext(context);
SDL_DestroyWindow(window);
// Close SDL
SDL_Quit();
return 0;
}
cpp/apps/App2/app2.cpp
#include <iostream>
using std::cout;
using std::endl;
// Import my Vector module ?
import Vector;
int main()
{
// Testing my module!
my_lib::Vector2f v1{ 1.0f, -0.5f };
v1.print();
return 0;
}
cpp/my_lib/Math/Vector.mpp
module;
#include <cmath>
#include <print>
export module Vector;
export namespace my_lib
{
template <typename T>
struct Vector2D
{
T x{}, y{};
void print() const
{
std::println("Vector2: [{}, {}]", x, y);
}
};
// Shortcuts to the most used ones
using Vector2f = Vector2D<float>;
using Vector2i = Vector2D<int>;
}
Directory tree
.
├── build
│ └── linux
│ └── x86_64
│ ├── debug
│ │ └── libglad.a
├── cpp
│ ├── apps
│ │ ├── App1
│ │ │ └── app1.cpp
│ │ └── App2
│ │ └── app2.cpp
│ ├── my_lib
│ │ └── Math
│ │ └── Vector.mpp
│ └── third_party
│ └── glad
│ ├── glad
│ │ └── glad.h
│ ├── glad.c
│ └── KHR
│ └── khrplatform.h
└── xmake.lua
from xmake.
please provide a whole project. and try disable lto.
from xmake.
All the files should be listed in my previous post. And I have disabled LTO
$ xmake
[ 15%]: cache compiling.debug cpp/third_party/glad/glad.c
[ 20%]: archiving.debug libglad.a
[ 55%]: <app1> compiling.module.debug Vector
[ 60%]: <app2> compiling.module.debug Vector
[ 70%]: compiling.debug cpp/apps/App1/app1.cpp
[ 80%]: compiling.debug cpp/apps/App2/app2.cpp
[ 85%]: linking.debug app2_linux_x86_64-debug
[ 95%]: linking.debug app1_linux_x86_64-debug
Now the only thing the linker does not find is SDL functions
$ xmake -vD
error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/debug/app1_linux_x86_64-debug build/.objs/app1/linux/x86_64/debug/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/debug/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/debug -lglad) failed(1)
stack traceback:
[C]: in function 'error'
[@programdir/core/base/os.lua:973]:
[@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
[@programdir/modules/core/tools/gcc.lua:580]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]:
[@programdir/core/tool/linker.lua:221]: in function 'link'
[@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
[@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
[@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
[@programdir/actions/build/kinds/binary.lua:83]:
[@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
[@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
[@programdir/modules/async/runjobs.lua:238]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]: in function 'trycall'
[@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
[@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
[@programdir/core/base/scheduler.lua:406]:
stack traceback:
[C]: in function 'error'
@programdir/core/base/os.lua:973: in function 'os.raiselevel'
(...tail calls...)
@programdir/core/main.lua:329: in upvalue 'cotask'
@programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>
from xmake.
I need full projects and I don't have time to create them one by one.
from xmake.
Sorry. What do you mean by full project? a zip file? a public repo?
from xmake.
I think either would be fine, the idea is to be able to reproduce the bug in less than two minutes
from xmake.
Sorry. What do you mean by full project? a zip file? a public repo?
a zip file with your all project files, you can upload it as issue attachment
from xmake.
I see, thank you. Here is the project
template_module_not_found.zip
from xmake.
It works for me on my fedora/gcc.
$ xmake -rv
checking for flags (gcc_deps_format) ... ok
checking for flags (gcc_deps_file) ... ok
checking for flags (gcc_deps_output) ... ok
[ 0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
checking for flags (-fvisibility-inlines-hidden) ... ok
checking for flags (-O2) ... ok
checking for flags (-std=c++23) ... ok
checking for flags (-D_GLIBCXX_USE_CXX11_ABI=0) ... ok
checking for flags (-DNDEBUG) ... ok
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/apps/App1/app1.cpp -MT build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.json -MD -MF build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.json -fdeps-target=build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o -o build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/32ea7a34/app1.cpp.i
[ 0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/my_lib/Math/Vector.mpp -MT build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.json -MD -MF build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.json -fdeps-target=build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -o build/.gens/app1/linux/x86_64/release/rules/bmi/cache/modules/69159ac3/Vector.mpp.i
checking for flags (gcc_module_mapper) ... ok
[ 0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/my_lib/Math/Vector.mpp -MT build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.json -MD -MF build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.json -fdeps-target=build/.objs/my_lib/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -o build/.gens/my_lib/linux/x86_64/release/rules/bmi/cache/modules/62063509/Vector.mpp.i
[ 0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/apps/App2/app2.cpp -MT build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.json -MD -MF build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.json -fdeps-target=build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o -o build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/a2e5a9c2/app2.cpp.i
[ 0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
/usr/bin/gcc -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -E -x c++ cpp/my_lib/Math/Vector.mpp -MT build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.json -MD -MF build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.d -fdeps-format=p1689r5 -fdeps-file=build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.json -fdeps-target=build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -o build/.gens/app2/linux/x86_64/release/rules/bmi/cache/modules/b8076ef4/Vector.mpp.i
checking for the c compiler (cc) ... gcc
checking for flags (-O2) ... ok
checking for flags (-DNDEBUG) ... ok
[ 15%]: cache compiling.release cpp/third_party/glad/glad.c
/usr/bin/gcc -c -m64 -fvisibility=hidden -Wall -Wextra -O2 -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -DNDEBUG -o build/.objs/glad/linux/x86_64/release/cpp/third_party/glad/glad.c.o cpp/third_party/glad/glad.c
checking for flags (-MMD -MF) ... ok
checking for ar ... /usr/bin/ar
checking for the static library archiver (ar) ... ar
[ 20%]: archiving.release libglad.a
/usr/bin/ar -cr build/linux/x86_64/release/libglad.a build/.objs/glad/linux/x86_64/release/cpp/third_party/glad/glad.c.o
checking for the c++ compiler (cxx) ... gcc
[ 55%]: <app1> compiling.module.release Vector
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app1/cpp/my_lib/Math/Vector.mpp -x c++ -o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o cpp/my_lib/Math/Vector.mpp
[ 60%]: <app2> compiling.module.release Vector
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app2/cpp/my_lib/Math/Vector.mpp -x c++ -o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o cpp/my_lib/Math/Vector.mpp
checking for flags (-fdiagnostics-color=always) ... ok
[ 70%]: compiling.release cpp/apps/App1/app1.cpp
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app1/cpp/apps/App1/app1.cpp -o build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o cpp/apps/App1/app1.cpp
checking for flags (-MMD -MF) ... ok
[ 80%]: compiling.release cpp/apps/App2/app2.cpp
/usr/bin/gcc -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -O2 -std=c++23 -I/mnt/template_module_not_found/cpp -Icpp/third_party/glad -fexceptions -finput-charset=UTF-8 -fexec-charset=UTF-8 -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include -isystem /home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/include/SDL2 -fmodules-ts -D_GLIBCXX_USE_CXX11_ABI=0 -DNDEBUG -fmodule-mapper=/tmp/.xmake995/240702/app2/cpp/apps/App2/app2.cpp -o build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o cpp/apps/App2/app2.cpp
checking for the linker (ld) ... g++
[ 85%]: linking.release app2_linux_x86_64-release
/usr/bin/g++ -o build/linux/x86_64/release/app2_linux_x86_64-release build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
[ 95%]: linking.release app1_linux_x86_64-release
/usr/bin/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
[100%]: build ok, spent 24.113s
from xmake.
try
add_packages("libsdl", {public = true})
and
add_requires("libsdl", {system = false})
from xmake.
It doesn't work either way
Using add_packages("libsdl", {public = true})
$ xmake clean
$ xmake
[ 0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[ 0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[ 0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 15%]: cache compiling.release cpp/third_party/glad/glad.c
[ 20%]: archiving.release libglad.a
[ 55%]: <app1> compiling.module.release Vector
[ 60%]: <app2> compiling.module.release Vector
[ 70%]: compiling.release cpp/apps/App1/app1.cpp
[ 80%]: compiling.release cpp/apps/App2/app2.cpp
[ 85%]: linking.release app2_linux_x86_64-release
[ 95%]: linking.release app1_linux_x86_64-release
error: /usr/bin/ld: build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o: in function `main':
app1.cpp:(.text.startup+0xd): undefined reference to `SDL_GetSystemRAM'
/usr/bin/ld: app1.cpp:(.text.startup+0x95): undefined reference to `SDL_Init'
/usr/bin/ld: app1.cpp:(.text.startup+0xc2): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0xd6): undefined reference to `SDL_GL_CreateContext'
/usr/bin/ld: app1.cpp:(.text.startup+0xdb): undefined reference to `SDL_GL_GetProcAddress'
/usr/bin/ld: app1.cpp:(.text.startup+0x109): undefined reference to `SDL_PollEvent'
/usr/bin/ld: app1.cpp:(.text.startup+0x124): undefined reference to `SDL_GL_SwapWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x139): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x141): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x146): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x16e): undefined reference to `SDL_GetError'
/usr/bin/ld: app1.cpp:(.text.startup+0x190): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x198): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x19d): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x1bb): undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status
Using add_requires("libsdl", {system = false})
$ xmake clean
$ xmake
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
-> expat 2.6.2 [from:wayland]
-> wayland 1.23.0 [private, from:libsdl]
-> libsdl 2.30.4
please input: y (y/n/m)
y
=> download https://github.com/libexpat/libexpat/releases/download/R_2_6_2/expat-2.6.2.tar.bz2 .. ok
=> install expat 2.6.2 .. ok
=> download https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.23.0/downloads/wayland-1.23.0.tar.xz .. ok
=> install wayland 1.23.0 .. ok
=> download https://github.com/libsdl-org/SDL/releases/download/release-2.30.4/SDL2-2.30.4.zip .. ok
=> install libsdl 2.30.4 .. ok
[ 0%]: <app1> generating.module.deps cpp/apps/App1/app1.cpp
[ 0%]: <app1> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 0%]: <my_lib> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 0%]: <app2> generating.module.deps cpp/apps/App2/app2.cpp
[ 0%]: <app2> generating.module.deps cpp/my_lib/Math/Vector.mpp
[ 15%]: cache compiling.release cpp/third_party/glad/glad.c
[ 20%]: archiving.release libglad.a
[ 55%]: <app1> compiling.module.release Vector
[ 60%]: <app2> compiling.module.release Vector
[ 70%]: compiling.release cpp/apps/App2/app2.cpp
[ 80%]: compiling.release cpp/apps/App1/app1.cpp
[ 85%]: linking.release app2_linux_x86_64-release
[ 95%]: linking.release app1_linux_x86_64-release
error: /usr/bin/ld: build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o: in function `main':
app1.cpp:(.text.startup+0xd): undefined reference to `SDL_GetSystemRAM'
/usr/bin/ld: app1.cpp:(.text.startup+0x95): undefined reference to `SDL_Init'
/usr/bin/ld: app1.cpp:(.text.startup+0xc2): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0xd6): undefined reference to `SDL_GL_CreateContext'
/usr/bin/ld: app1.cpp:(.text.startup+0xdb): undefined reference to `SDL_GL_GetProcAddress'
/usr/bin/ld: app1.cpp:(.text.startup+0x109): undefined reference to `SDL_PollEvent'
/usr/bin/ld: app1.cpp:(.text.startup+0x124): undefined reference to `SDL_GL_SwapWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x139): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x141): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x146): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x16e): undefined reference to `SDL_GetError'
/usr/bin/ld: app1.cpp:(.text.startup+0x190): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x198): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x19d): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x1bb): undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status
xmake -vD
[ 90%]: linking.release app1_linux_x86_64-release
/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/release -s -lglad
/usr/bin/ld: build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o: in function `main':
app1.cpp:(.text.startup+0xd): undefined reference to `SDL_GetSystemRAM'
/usr/bin/ld: app1.cpp:(.text.startup+0x95): undefined reference to `SDL_Init'
/usr/bin/ld: app1.cpp:(.text.startup+0xc2): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0xd6): undefined reference to `SDL_GL_CreateContext'
/usr/bin/ld: app1.cpp:(.text.startup+0xdb): undefined reference to `SDL_GL_GetProcAddress'
/usr/bin/ld: app1.cpp:(.text.startup+0x109): undefined reference to `SDL_PollEvent'
/usr/bin/ld: app1.cpp:(.text.startup+0x124): undefined reference to `SDL_GL_SwapWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x139): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x141): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x146): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x16e): undefined reference to `SDL_GetError'
/usr/bin/ld: app1.cpp:(.text.startup+0x190): undefined reference to `SDL_GL_DeleteContext'
/usr/bin/ld: app1.cpp:(.text.startup+0x198): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: app1.cpp:(.text.startup+0x19d): undefined reference to `SDL_Quit'
/usr/bin/ld: app1.cpp:(.text.startup+0x1bb): undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status
error: @programdir/core/main.lua:329: @programdir/actions/build/main.lua:148: @programdir/modules/async/runjobs.lua:322: @programdir/actions/build/kinds/binary.lua:53: @programdir/core/sandbox/modules/os.lua:378: execv(/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/release -s -lglad) failed(1)
stack traceback:
[C]: in function 'error'
[@programdir/core/base/os.lua:973]:
[@programdir/core/sandbox/modules/os.lua:378]: in function 'execv'
[@programdir/modules/core/tools/gcc.lua:580]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]:
[@programdir/core/tool/linker.lua:221]: in function 'link'
[@programdir/actions/build/kinds/binary.lua:53]: in function 'callback'
[@programdir/modules/core/project/depend.lua:217]: in function 'on_changed'
[@programdir/actions/build/kinds/binary.lua:41]: in function '_do_link_target'
[@programdir/actions/build/kinds/binary.lua:83]:
[@programdir/actions/build/kinds/binary.lua:110]: in function '_link_target'
[@programdir/actions/build/kinds/binary.lua:138]: in function 'jobfunc'
[@programdir/modules/async/runjobs.lua:238]:
[C]: in function 'xpcall'
[@programdir/core/base/utils.lua:275]: in function 'trycall'
[@programdir/core/sandbox/modules/try.lua:117]: in function 'try'
[@programdir/modules/async/runjobs.lua:220]: in function 'cotask'
[@programdir/core/base/scheduler.lua:406]:
stack traceback:
[C]: in function 'error'
@programdir/core/base/os.lua:973: in function 'base/os.raiselevel'
(...tail calls...)
@programdir/core/main.lua:329: in upvalue 'cotask'
@programdir/core/base/scheduler.lua:406: in function <@programdir/core/base/scheduler.lua:399>
from xmake.
my link logs:
/usr/bin/g++ -o build/linux/x86_64/release/app2_linux_x86_64-release build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/ruki/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
your link logs:
/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -Lbuild/linux/x86_64/release -s -lglad
libsdl link is missing. I'm not sure if you're setting add_packages("libsdl", {public = true})
correctly, but it's working for me.
from xmake.
Ok. I had the add_packages("libsdl", {public = true})
part in the wrong place. Now it is under the library target
Linking is fine now:
[ 85%]: linking.release app2_linux_x86_64-release
/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app2_linux_x86_64-release build/.objs/app2/linux/x86_64/release/cpp/apps/App2/app2.cpp.o build/.objs/app2/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/paul/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
[ 95%]: linking.release app1_linux_x86_64-release
/usr/lib64/ccache/g++ -o build/linux/x86_64/release/app1_linux_x86_64-release build/.objs/app1/linux/x86_64/release/cpp/apps/App1/app1.cpp.o build/.objs/app1/linux/x86_64/release/cpp/my_lib/Math/Vector.mpp.o -m64 -L/home/paul/.xmake/packages/l/libsdl/2.30.4/4d6ee6e79e2743728490251a70ca0e42/lib -Lbuild/linux/x86_64/release -s -lSDL2main -lSDL2 -lglad -lpthread -ldl
build cache stats:
cache directory: build/.build_cache
cache hit rate: 100%
cache hit: 1
cache hit total time: 0.001s
cache miss: 0
cache miss total time: 0.000s
new cached files: 0
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 0
compile total time: 0.000s
[100%]: build ok, spent 6.067s
But now xmake doesn' t run my apps. I can see the binaries are generated in the correct folders. File sizes look correct. Am I doing something wrong?
$ xmake run app1
error: cannot execv(/home/paul/Programming/xmake/post/build/linux/x86_64/release/app1_linux_x86_64-release ), No such file or directory
$ xmake run app2
error: cannot execv(/home/paul/Programming/xmake/post/build/linux/x86_64/release/app2_linux_x86_64-release ), No such file or directory
from xmake.
you can use lldb/gdb to debug it.
xmake f -m debug
xmake
xmake run -d app1
from xmake.
Thank you. In my original project, everything is working now
from xmake.
Related Issues (20)
- 有没有办法实现对指定的文件增加编译选项 HOT 3
- MacBook Pro M3 install boost 1.85 failed HOT 3
- .xmake directory always appears next to xmake.lua HOT 5
- 添加在Linux下对Clang-CL的支持 HOT 7
- windows 环境下,生成 CMakeLists.txt 文件,使用 cmake + Ninja + tcc 编译时报错 HOT 11
- xmake将xmake test程序的stdout输出存入/tmp导致/tmp目录被塞满 HOT 13
- Allow wildcards in target:add("files", ...) HOT 1
- 设置本地编译器`gnu-rm`实际变成`gcc` HOT 7
- 在if判断内通过set_config设置qt路径无效 HOT 3
- xmake fails to find host macOS toolchain HOT 5
- 使用远程库构建时updating repositories阶段存在版本管理相关报错导致失败 HOT 3
- xmake test 在windows平台无法正确同时设置多个add_test("test",{run_timeout(1000)}) HOT 9
- gnu-rm下,汇编文件week函数无法被同名文件覆盖 HOT 4
- xrepo 很多 action 都失效了,会提示找不到 xmake.lua HOT 5
- mktemp usage messages during configure HOT 2
- Error-prone xmake behaviour when locating system packages HOT 2
- wrong include flag when using system llvm HOT 2
- Build failure when output of `uname -m` contains a space (e.g. on PowerPC Macs) HOT 2
- msvc 编译模块报错:attempt to concatenate a nil value (local 'bmifile') HOT 3
- cmakelists 生成不支持编译器 flags HOT 12
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.