Giter VIP home page Giter VIP logo

linux-opengl-examples's People

Contributors

blackle avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

linux-opengl-examples's Issues

Debug mode undefined reference to symbol exit

Firstly thank you so much for putting this out, it's super easy to use and I managed to compile my 4k graphics entry without any trouble. The file size ends up about 500 bytes bigger than the Crinkler processed Windows exe, but your Makefile workflow is so much nicer then trying to use Visual Studio's gui!

Anyway, here's the issue, I've never used C before so probably a newcomer mistake. When running make gtk-opengl with the #define DEBUG enabled, I get the following:

gcc -o gtk-opengl.elf gtk-opengl.c `pkg-config --cflags gtk+-3.0` -lGL -lgtk-3 -lgdk-3 -lgobject-2.0 -no-pie -fno-plt -Os -std=gnu11 -nostartfiles -nostdlib
gtk-opengl.c: In function ‘on_realize’:
gtk-opengl.c:62:23: warning: passing argument 3 of ‘glShaderSource’ from incompatible pointer type [-Wincompatible-pointer-types]
  glShaderSource(v, 1, &vshader, NULL);
                       ^
In file included from /usr/include/GL/gl.h:2055:0,
                 from gtk-opengl.c:11:
/usr/include/GL/glext.h:777:21: note: expected ‘const GLchar * const* {aka const char * const*}’ but argument is of type ‘char **’
 GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
                     ^~~~~~~~~~~~~~
gtk-opengl.c: In function ‘_start’:
gtk-opengl.c:134:2: warning: ‘gdk_cursor_new’ is deprecated [-Wdeprecated-declarations]
  GdkCursor* Cursor = gdk_cursor_new(GDK_BLANK_CURSOR);
  ^~~~~~~~~
In file included from /usr/include/gtk-3.0/gdk/gdk.h:34:0,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from gtk-opengl.c:9:
/usr/include/gtk-3.0/gdk/gdkcursor.h:228:12: note: declared here
 GdkCursor* gdk_cursor_new   (GdkCursorType    cursor_type);
            ^~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cchKw7fs.o: undefined reference to symbol 'exit@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libc.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:17: recipe for target 'gtk-opengl.elf' failed
make: *** [gtk-opengl.elf] Error 1

A bunch of warnings then this undefined reference to symbol 'exit@@GLIBC_2.2.5', which is strange because isn't that part of the standard library?

The reason I want to use DEBUG, is because sometimes I make shader errors and I have no easy way of finding them otherwise.

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.