-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
34 lines (28 loc) · 1.14 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class App : public winrt::Microsoft::UI::Xaml::ApplicationT<App>
{
public:
void OnLaunched(winrt::Microsoft::UI::Xaml::LaunchActivatedEventArgs const &)
{
window = winrt::Microsoft::UI::Xaml::Window();
window.Title(L"Win UI3 Main Window");
window.Activate();
}
private:
winrt::Microsoft::UI::Xaml::Window window{nullptr};
};
int main()
{
winrt::init_apartment(winrt::apartment_type::single_threaded);
mddbootstapper mdd;
::winrt::Microsoft::UI::Xaml::Application::Start([](auto &&) { winrt::make<App>(); });
}
/*
You need:
https://github.com/trcrsired/windows-msvc-sysroot
and clang of course
https://github.com/trcrsired/llvm-releases/releases
clang++ -c pch.hpp -O3 -std=c++26 -flto=thin --config=d:\cfgs\x86_64-windows-msvc.cfg -fuse-ld=lld
clang++ -o main.exe main.cpp -include-pch pch.hpp.pch -O3 -std=c++26 -flto=thin -fuse-ld=lld --config=d:\cfgs\x86_64-windows-msvc.cfg -lole32 -loleaut32 -lruntimeobject -lmicrosoft.windowsappruntime.bootstrap
my cfg:
--target=x86_64-windows-msvc --sysroot=D:/toolchains/windows-msvc-sysroot -fuse-ld=lld -std=c++26 -ID:/libraries/fast_io/include -D_DLL=1 -lmsvcrt
*/