Closed DiegoJArg closed 10 months ago
Hi @DiegoJArg. Thanks for use NAppGUI and for the feedback!
For compile NAppGUI in Windows, the command sequence is:
git clone --depth 1 https://github.com/frang75/nappgui_src.git
cd nappgui_src
// -G "Visual Studio 17 2022" force to use this version of VS. Can be omitted if you have only one version installed.
// -A Win32 compile for Windows 32 bits (64 bits is default in VS 2022).
// -T v143 is not required (is the default toolset in VS2022)
cmake -G "Visual Studio 17 2022" -A Win32 -S ./src -B ./build
// This will build in Release mode (with all speed and space optimizations)
// You have three configurations Debug, Release, ReleaseWithAsserts
cmake --build ./build --config Release
After compile, here you have all executables.
cd build
cd Release
cd bin
dir
08-Feb-23 21:58 <DIR> .
08-Feb-23 21:58 <DIR> ..
08-Feb-23 21:58 380,928 Bode.exe
08-Feb-23 21:58 312,832 Bricks.exe
08-Feb-23 21:58 414,720 Col2dHello.exe
08-Feb-23 21:58 312,832 Dice.exe
08-Feb-23 21:58 320,000 Die.exe
08-Feb-23 21:58 343,552 DrawBig.exe
08-Feb-23 21:58 379,392 DrawHello.exe
08-Feb-23 21:58 673,280 DrawImg.exe
08-Feb-23 21:58 314,880 Fractals.exe
08-Feb-23 21:58 715,776 GuiHello.exe
08-Feb-23 21:58 313,344 HelloCpp.exe
08-Feb-23 21:58 307,200 HelloWorld.exe
08-Feb-23 21:58 149,504 nrc.exe
08-Feb-23 21:58 401,408 Products.exe
08-Feb-23 21:58 <DIR> res
08-Feb-23 21:58 332,800 UrlImg.exe
15 File(s) 5,672,448 bytes
More info about Windows compilation here: https://nappgui.com/en/guide/win_mac_linux.html#h1 More about configurations here: https://nappgui.com/en/guide/win_mac_linux.html#h4
\build
folder you have the NAppGUI.sln
if you like Debug/Edit your code with Visual Studio.msbuild
directly. cmake --build ./build --config Release
does it for you.Wow, thanks for answering so quickly. I followed this steps and now noted that it was generating for Ninja. Probably because I have installed msys2/mingw and is on the path. Also, with VStudio installed, it defaulted to mingw. All demos are now fine sized. Thank you.
I hope that you add support for MinGW some day.
MinGW support is planned for NAppGUI 1.5. Please follow these issues: https://github.com/frang75/nappgui_src/issues/5 https://github.com/frang75/nappgui_src/issues/48
Hi. A beautiful effort is being put on this library. I really appreciate the goal and vision of this project.
Trying to give it a first try, by following the simple-to-read guide: https://nappgui.com/en/start/quick.html I struggled a bit with it. It wasn't as straight forward as it first seemed by reading.
While running
cmake -S ./src -B ./build
, it won't just compile,Unknown compiler
and such. Previous steps were required.The first thing to learn is the incompatibility with MSYS2/MinGW. Therefore, I had to download 10Gb of Visual Studio Community, which is over bloated to my taste. Then cmake for windows as instructed, avoiding the use of msys2 installed one.
The second thing to learn, not being a CMake expert, is that it should be setup with cmake-gui. Picture attached. Or alternatively, with this command. ref:
So the sequence of the guide is missing one step
Once compiled, I don't get the expected demo/example binaries in the Debug folder. And I got to this point. Not sure why yet.
I downloaded the example binaries and they look very nice. I really like how they are barely 400kb.
The third thing to learn, I readed somewhere about a command
msbuild NAppGUI.sln
which is called fromsrc
folder. When VS was installed it didn't placed anything on the path, so I had to manually add it.C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin
, after that, restarted the CMD Console and went back to the folder.Finally, got the examples binaries in src/Debug/bin/... Buttttt, they are about 3Mb, not 400kb. I guess that some deep compiler optimization is required and still missing on the sequence.
Also, I haven't opened the +10Gb of Visual Studio. Is it really required?
Hope this feedback helps. Kind regards,