VuiLib
VuiLib copied to clipboard
Can VuiLib build on Linux/Unix/Darwin?
Suggestions
I tried to build VuiLib on Debian GNU/Linux, but it used WinAPI. So may you add Unix(or U*ix) support?
- And you should rename 'makelist.txt' to 'CMakeLists.txt' for CMake build.
- You can also set CMake minimal version to '3.1' instead of '3.23' because it is too version is too new.
CMake build log
mkdir build && cd build && cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/VuiLib/build
make
Scanning dependencies of target vuilib
[ 2%] Building CXX object CMakeFiles/vuilib.dir/src/core/object/vapplication.cc.o
In file included from /home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/../signal/../vbasiccore.h:36,
from /home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/../signal/vsignal.h:10,
from /home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/vtimer.h:3,
from /home/user/VuiLib/src/core/object/../../../include/core/object/vapplication.h:10,
from /home/user/VuiLib/src/core/object/vapplication.cc:1:
/home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/../signal/../../debug/vdebug.h:3:10: fatal error: windows.h: 没有那个文件或目录
3 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/vuilib.dir/build.make:82:CMakeFiles/vuilib.dir/src/core/object/vapplication.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:124:CMakeFiles/vuilib.dir/all] 错误 2
Uname infomation
Linux LAPTOP-GP6VBLDH 5.10.43-2-windows-subsystem-for-android #1 SMP PREEMPT Tue Sep 14 09:09:25 UTC 2021 x86_64 GNU/Linux
Fix patch
~~I'm too lazy to submit a pr (doge)~~
- Move makelist.txt to CMakeLists.txt.
CMakeLists.txt:
--- vl/makelist.txt 2023-05-04 20:30:27.375390580 +0800
+++ VuiLib/CMakeLists.txt 2023-05-04 20:13:38.515373370 +0800
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.23)
+cmake_minimum_required(VERSION 3.1)
project(vuilib_cmake)
set(CMAKE_CXX_STANDARD 11)
@@ -26,4 +26,3 @@ add_library(vuilib STATIC ${DIR_SRCS})
add_executable(vuilib_cmake main.cpp)
target_link_libraries(vuilib_cmake vuilib)
-
Thanks for your suggestions, since I am now busy with other works, so I don't have any time to focus on the platform crossing. I will try to build vuilib on the other operation system and change the render API (maybe in next month) like SDL or Vulkan.
我希望在以后为 VuiLib 的跨平台提供技术支持,您是否希望 VuiLib 能够在 Linux 上运行?
我希望在以后为 VuiLib 的跨平台提供技术支持,您是否希望 VuiLib 能够在 Linux 上运行?
暂时这个项目是完全依赖于DirectX作为渲染后端。你可以尝试移植VRender实现跨平台
我希望在以后为 VuiLib 的跨平台提供技术支持,您是否希望 VuiLib 能够在 Linux 上运行?
显然我是希望的嘛 xD 如果您愿意的话,我当然非常感谢您能完成跨平台工作
VUILib 3.x now support build on Unix/Linux/Darwin, passing unit test under my PC on manjaro and PC on Windows 11. In fact, supporting cross platform is quite a hard job which different platform actually has different rules like rendering method or window operation (e.g. Creation/Destory), so I took a long progress to finish it. However sadly, VUILib 3.x is still under development that is not valiable for using now.
In addition, I am quite eager for a partner to maintain this project. If you still have interest in it, please sent email to my private email on ($margoo$ $at$ $margoo$ $dot$ $icu$)