Closed AregevDev closed 5 years ago
In develop, hope I have time now to support it I used cmake that create solution for vs Now it using nanort render, instead of opengl render, because SDL compatibility need Will fix readme with build instructions
clone repo $mkdir build $cd build & cmake .. open solution in vs sory just may test in on windows 10 only yet
Thanks for replying, Which SDL version should I use when building? Does it support SDL 2.0.9?
Yep, just downloaded stable from libsdl.org, seems it need again update install instructions for win
I am getting build errors when building the generated solution https://pastebin.com/D2X2YTPH Mind taking a look?
I am using SDL 2.0.9
what '$build cmake ..' say?
PS E:\source\nanogui-sdl\build> $build cmake ..
At line:1 char:8
+ $build cmake ..
+ ~~~~~
Unexpected token 'cmake' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
ouch.... $build cmake .. means run 'cmake ..' from folder build
That's what I do, it configured alright, but it fails to build
I use this configure command to detect the libraries:
cmake -DSDL2_LIBRARY="../../libs/x64-windows-static/lib" -DSDL2_INCLUDE_DIR="../../libs/x64-windows-static/include" -DSDL2TTF_LIBRARY="../../libs/x64-windows-static/lib" -DSDL2TTF_INCLUDE_DIR="../../libs/x64-windows-static/include" -DSDL2_IMAGE_LIBRARY="../../libs/x64-windows-static/lib" -DSDL2_IMAGE_INCLUDE_DIR="../../libs/x64-windows-static/include" ..
will try you cmd line possible you need removed content from build folder and run your command again, because cmake may cached some variables? on my pc output was,
$build cmake ..
SDL2_INCLUDE_DIR is D:/SDL2/include
SDL2_LIBRARY_PATH is D:/SDL2/lib/x86/SDL2.lib
SDL2IMAGE_LIBRARY is D:/SDL2/lib/x86/SDL2_image.lib
SDL2TTF_LIBRARY is D:/SDL2/lib/x86/SDL2_ttf.lib
-- Configuring done
-- Generating done
-- Build files have been written to: D:/nanogui-sdl/build
d:\nanogui-sdl\build>cmake -DSDL2_LIBRARY="D:/sdl2/xb86/sdl2.lib" -DSDL2_INCLUDE_DIR="d:/sdl2/include" -DSDL2TTF_LIBRARY="d:/sdl2/lib/x86/sdl2_ttf.lib" -DSDL2TTF_INCLUDE_DIR="d:/sdl2/include" -DSDL2_IMAGE_LIBRARY="d:/sdl2/lib/x86/sdl2_image.lib" SDL2_IMAGE_INCLUDE_DIR="d:/sdl2/include" ..
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version to target Windows 10.0.18362.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
SDL2_INCLUDE_DIR is D:/SDL2/include
SDL2_LIBRARY_PATH is D:/SDL2/lib/x86/SDL2.lib
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found SDL2: D:/sdl2/xb86/sdl2.lib
-- Found SDL2_image: D:/SDL2/lib/x86/SDL2_image.lib
SDL2IMAGE_LIBRARY is D:/SDL2/lib/x86/SDL2_image.lib
SDL2TTF_LIBRARY is d:/sdl2/lib/x86/sdl2_ttf.lib
-- Found SDL2TTF: d:/sdl2/lib/x86/sdl2_ttf.lib
opengl32
-- Configuring done
-- Generating done
-- Build files have been written to: D:/nanogui-sdl/build
What's you output when you build:
IE cmake --build .
?
I deleted my build folder's contents, reconfigured again, it comes up with the same build errors
d:\nanogui-sdl\build>cmake -DSDL2_LIBRARY="D:/sdl2/lib/x86/sdl2.lib" -DSDL2_INCLUDE_DIR="d:/sdl2/include" -DSDL2TTF_LIBRARY="d:/sdl2/lib/x86/sdl2_ttf.lib" -DSDL2TTF_INCLUDE_DIR="d:/sdl2/include" -DSDL2_IMAGE_LIBRARY="d:/sdl2/lib/x86/sdl2_image.lib" SDL2_IMAGE_INCLUDE_DIR="d:/sdl2/include" ..
-- Selecting Windows SDK version to target Windows 10.0.18362.
SDL2_INCLUDE_DIR is D:/SDL2/include
SDL2_LIBRARY_PATH is D:/SDL2/lib/x86/SDL2.lib
-- Found SDL2: D:/sdl2/lib/x86/sdl2.lib
SDL2IMAGE_LIBRARY is D:/SDL2/lib/x86/SDL2_image.lib
SDL2TTF_LIBRARY is d:/sdl2/lib/x86/sdl2_ttf.lib
opengl32
-- Configuring done
-- Generating done
-- Build files have been written to: D:/nanogui-sdl/build
d:\nanogui-sdl\build>cmake --build .
Microsoft (R) Build Engine версии 14.0.27530.0
example1.vcxproj -> D:\nanogui-sdl\build\Debug\example1.exe
example1.vcxproj -> D:/nanogui-sdl/build/Debug/example1.pdb (Full PDB)
Building Custom Rule D:/nanogui-sdl/CMakeLists.txt
d:\nanogui-sdl\build>
Which SDL version do you use, that's so strange for me...
Does nanogui-sdl
depend on something, other than SDL, SDL image and SDL ttf?
No other depends
Which SDL version do you use, that's so strange for me...
And the version?
Last stable from libsdl.org 2.0.10
I rebuilt 2.0.10 this time, same errors.
They are about undefined references
SDL_FRect
SDL_FPoint
SDL_RenderFillRectF
Do you know where they are from?
It sdl2 structs
Are you sure? Does not seem like that
sure, official sdl repo http://hg.libsdl.org/SDL/file/bc90ce38f1e2/include/SDL_rect.h look at line 88
created travis-ci for test building on windows it downloads stable sdl2 stuff from libsdl.org and unpack it after that build no errors
try now
fixed
Hi, I really appreciate this fork of nanogui. I prefer using SDL for my OpenGL development and this library is absolutely beautiful and suit my needs.
Is this fork still active? There is a commit from yesterday after a few years of inactivity...
Also, I tried to build it today from source, on Windows. It generally has many problems:
Need to manually build SDL2 from source and specify the include and library directories. I suggest adding a submodule to the GitHub mirror of SDL2 and find a way to build SDL2TTF and SDL2_Image since they don't use CMake...
Headers include SDL.h instead of SDL2/SDL.h
Many compile errors with unresolved references, specifically SDL_FRect / FPoint. Not sure what they are.
GLCanvas widget is missing. One the project builds again, it's worth implementing... It might be more complex though...
Please keep the hard work! Much appreciated. I will happily contribute to this project.
Best regards Alon