Coder Social home page Coder Social logo

moros1138 / pge-template-project Goto Github PK

View Code? Open in Web Editor NEW
27.0 4.0 2.0 3.97 MB

This is a template project using CMake to serve as a jumping off point for you to build your masterpiece olcPixelGameEngine application.

License: Other

CMake 3.40% C++ 96.60%
visual-studio arch-linux clang cmake gcc linux macos manjaro-linux ubuntu windows

pge-template-project's People

Contributors

moros1138 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

higgs666

pge-template-project's Issues

Linker fails to find GLUT

When running make, I get the following error:

ld: library not found for -lglut
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Glut is installed with brew and the actual cmake . command does not return an error.

pthread_create not found

After executing make in Ubuntu 20.04:

/usr/bin/ld: CMakeFiles/TestApp.dir/src/main.cpp.o: in function std::thread::thread<void (olc::PixelGameEngine::*)(), olc::PixelGameEngine*, void>(void (olc::PixelGameEngine::*&&)(), olc::PixelGameEngine*&&)': main.cpp:(.text._ZNSt6threadC2IMN3olc15PixelGameEngineEFvvEJPS2_EvEEOT_DpOT0_[_ZNSt6threadC5IMN3olc15PixelGameEngineEFvvEJPS2_EvEEOT_DpOT0_]+0x37): undefined reference to pthread_create'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/TestApp.dir/build.make:91: bin/TestApp] Error 1

Then I checked the Cmake output and it said:

-- Looking for IceConnectionNumber in ICE - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
...

undeclared identifier 'assert'

I run cmake . and after this I run make but I get this error:

pge-template-project-main/include/olcPixelGameEngine.h:5977:4: error: use of undeclared identifier 'assert'
assert(resultAddMethod);

I install libpng, make, cmake , gcc over home-brew on my Mac.

Emscripten caching broken on windows

Describe the bug
embuilder inaccessible from inside cmake script, despite emsdk_env.bat in effect

To Reproduce
Steps to reproduce the behavior:

  1. Set up environemnt emsdk_env.bat
  2. Clone pge-template-project repo
  3. navigate into the repo directory
  4. create build directory and navitate into it
  5. run emcmake cmake ..

Expected behavior
cmake builds cache, ready to run cmake --build .

Actual Behavior
cmake errors out, claiming zlib and libpng were not found.

Desktop (please complete the following information):

  • OS:Windows
  • Toolchain: Cmake/mingw32-make/emscripten
  • Toolchain Version: latest
  • CMake Version: latest

Additional context
For some reason emscripten's environment isn't being passed through smake, so running embuilder doesn't pre-cache zlib and libpng as is expected on Linux and Mac.

Distribution [Feature Request]

Is your feature request related to a problem? Please describe.
The way the cmake script currently builds places the compiled binaries inside the build directory in a subdirectory named bin, the assets, if any, are copied to the bin directory. however it is not intuitive for the purposes of distribution.

Describe the solution you'd like
create a build directory structure that makes it more intuitive as to where built files and supporting asset data is stored to make it easy to integrate with packaging and distribution tooling.

Describe alternatives you've considered
i have considered leaving it alone and letting people figure it out on their own, but it's not intuitive.. not sure about other solutions to the problem.

Additional context
n/a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.