Closed soraphis closed 7 years ago
Hey, no worries about the issue. I should probably setup some simple examples repos using bgfx.cmake.
I've got an easy solution and a hard solution. For the easy solution, you also need to link against example-common. You can shorten your link libraries to just:
target_link_libraries(bgfx_test bgfx example-common)
After that there is no need to include files explicitly like you have. You can simply:
#include "common.h"
#include "bgfx_utils.h"
With these changes you should be up and running.
The hard solution is to not use example-common at all. It's not guaranteed to be production friendly. If you're just using it to learn, then there's no problem. My recommendation is to use GLFW, as I've had the least issues with it, but that's up to you. I have some code you may be able to pull from here if you want to go down that route: https://github.com/JoshuaBrookover/bigg
Best of luck!
thanks! thanks a lot! that worked just nice. the simple solution is just fine for me, cause i just need it to visualize some project of mine.
I think you should link to bigg in bgfx.cmake - its a simpler example than the ones coming with bgfx.
Anyway this issue seems ready for closing :)
I'm not totally happy with bigg just yet. That's why I haven't linked it in the readme. It was a weekend project that could probably be done better.
I would like to spend some time writing up some proper examples that aren't so messy. Maybe I can add it for now just so people have some sort of reference.
Hi,
i'm kinda sorry to open this as issue, because i think the fault lies by with me - not in this project. But i could not think of another place where i could find help to this
i'm using ubuntu 17.04, and CLion as my IDE.
i created a new C++ Project. it contains my main.cpp, a CMakeLists.txt and a subfolder thirdparty.
i clone the bgfx.cmake repository into the thirdparty subfolder and changed my CMakeLists.txt to look like this:
Then i changed my main.cpp to look like the HelloWorld example but with an empty update loop:
when i try to run the project i get this error:
as i wrote: i'm pretty sure i did something wrong, but i rly can't figure out what. So maybe someone can push me into the right direction.