Giter Site home page Giter Site logo

aminosbh / sdl2-pointerless Goto Github PK

View Code? Open in Web Editor NEW
93.0 93.0 3.0 206 KB

Use this one-file project/lib to create an SDL2 project/game WITHOUT any pointer specific knowledge.

License: MIT License

CMake 52.01% Shell 3.58% C 44.41%
c library sdl sdl2 tutorial

sdl2-pointerless's People

Contributors

aminosbh 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

sdl2-pointerless's Issues

Fails to compile

I am beginner and I tried to compile it using the cmake .. and I get a pthread error.

CMake Error at cmake/sdl2/FindSDL2.cmake:243 (message):
  Could NOT find Threads (Threads is required by SDL2).
Call Stack (most recent call first):
  CMakeLists.txt:51 (find_package)

And the CMakeOutput.log is,

Determining if the include file pthread.h exists passed with the following output:
Change Dir: /home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_8ee73/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_8ee73.dir/build.make CMakeFiles/cmTC_8ee73.dir/build
gmake[1]: Entering directory '/home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8ee73.dir/CheckIncludeFile.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_8ee73.dir/CheckIncludeFile.c.o -c /home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
Linking C executable cmTC_8ee73
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ee73.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_8ee73.dir/CheckIncludeFile.c.o -o cmTC_8ee73
gmake[1]: Leaving directory '/home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp'



Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD succeeded with the following output:
Change Dir: /home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_58b33/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_58b33.dir/build.make CMakeFiles/cmTC_58b33.dir/build
gmake[1]: Entering directory '/home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_58b33.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_58b33.dir/src.c.o -c /home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_58b33
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_58b33.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_58b33.dir/src.c.o -o cmTC_58b33
gmake[1]: Leaving directory '/home/zabit/Documents/study/code-learn/sdl-lazy-foo/sdl2-pointerless/build/CMakeFiles/CMakeTmp'


Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

I have downloaded the required dependencies.

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.