Cmake/C/C++를 잘 모르시는 분들은 빌드하는데 에로사항이 있는 분들이 있는거 같아서 해당 튜토리얼을 작성했습니다. IMGUI가 필요한경우 C# 프로그래머들은 imgui의 c# 래퍼인 imgui.net을 사용하여 구현합니다. 다만 ImGUI.NET에 포함된 cimplot, cimnodes 같은 편한 라이브러리들의 바이너리는 따로 빌드해서 배포가 안되어 있기에 직접 빌드해서 사용해야합니다. 그래서 직접 빌드해서 사용하는 방법을 알아보려고 합니다.
그리고, 이 튜토리얼은 imgui.net에 한정된게 아니라 cimgui 관련 빌드파일이 필요하신 모든 분들이 사용할 수 있는 dll 컴파일 튜토리얼 입니다. 그냥 명령어만 따라치시면 됩니다.
필수 선행사항
git환경변수와 cmake에 대해 환경변수 설정까지 해주셔야합니다.
빌드하는 방법
일단 아래 git을 clone 받아주세요
git clone https://github.com/shlifedev/.net-imgui-native-build-guide
shlifedev/.net-imgui-native-build-guide
Contribute to shlifedev/.net-imgui-native-build-guide development by creating an account on GitHub.
github.com
이후 아래 명령어를 입력해주세요
cd .net-imgui-native-build-guide
git submodule update --init --recursive
cd self-build
start ci-build.cmd
아래와같이 코드가 생성되며 [self-build\build\x64\Release] 폴더에 cimgui dll이 생성됩니다
(번외) 코드제네레이터가 필요한경우
https://github.com/cimgui/cimgui/tree/master/generator
cimgui/cimgui
c-api for imgui (https://github.com/ocornut/imgui) Look at: https://github.com/cimgui for other widgets - cimgui/cimgui
github.com
https://github.com/mellinoe/ImGui.NET/tree/master/src/CodeGenerator
mellinoe/ImGui.NET
An ImGui wrapper for .NET. Contribute to mellinoe/ImGui.NET development by creating an account on GitHub.
github.com
cimgui 폴더에서 output 결과물을 ImGUI.NET CodeGen에 돌리면 됩니다.
'프로그래밍 > c#' 카테고리의 다른 글
[C#] BigInteger로 방치형 게임의 A~ZZ 같은 숫자단위 구현 (3) | 2021.08.01 |
---|---|
[c#] imgui.net의 네이티브(cimgui, cimplot..)를 직접 빌드해서 적용하기 (0) | 2021.06.29 |
[c#] imgui.net 한글 출력 안되는 문제 해결 (0) | 2021.06.19 |
[C#] 버그를 줄일 수 있는 '읽기 전용 참조' (0) | 2021.03.06 |