Giter VIP home page Giter VIP logo

Comments (17)

revmischa avatar revmischa commented on May 25, 2024

Odd, it's building for me on OSX and linux ok: https://travis-ci.org/projectM-visualizer/projectm/builds/350333601

Down below it should include:

#ifdef __linux__
#ifdef USE_GLES1
#include <GLES/gl.h>
#else
#include <GL/gl.h>
#include <GL/glx.h>
#endif
#endif

May I ask what system this is?

from projectm.

yurivict avatar yurivict commented on May 25, 2024

May I ask what system this is?

FreeBSD. I am trying to update the port.

from projectm.

revmischa avatar revmischa commented on May 25, 2024

Okay, I'm assuming #ifdef __linux__ isn't the best check for FreeBSD. What would be a better define to check? Does it need to be changed everywhere?
Also, do you know if Travis supports FreeBSD? Would be good to have CI for it.

from projectm.

revmischa avatar revmischa commented on May 25, 2024

Also may need to add a BSD check in configure.ac under "Freedom":
https://github.com/projectM-visualizer/projectm/blob/master/configure.ac#L66

from projectm.

revmischa avatar revmischa commented on May 25, 2024

Please let me know how I can assist!

from projectm.

revmischa avatar revmischa commented on May 25, 2024

@yurivict peep #37
Builds for me ok

from projectm.

yurivict avatar yurivict commented on May 25, 2024

@revmischa The problem is gone with this patch.

One thing though is that I personally would've used:

#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)

This catches all linuxes and all BSDs.

__unix__ might catch some systems like MacOS or CygWin where we don't know if this should be changed.

from projectm.

yurivict avatar yurivict commented on May 25, 2024

Or maybe GL/gl.h should be included unconditionally, because the use is unconditional?

from projectm.

revmischa avatar revmischa commented on May 25, 2024

It appears to build on OSX: https://travis-ci.org/projectM-visualizer/projectm/builds/351963692

They all have:

#ifdef __APPLE__
#include <OpenGL/gl.h>
#endif

However. Maybe it should be:
#elseif __unix__ ...?

from projectm.

yurivict avatar yurivict commented on May 25, 2024

I would do:

#ifdef __APPLE__
#include <OpenGL/gl.h>
#endif

#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
#include <GL/gl.h>
#endif

It is easier to read (no elseifs), and doesn't make assumptions about systems we aren't sure about.

from projectm.

splbio avatar splbio commented on May 25, 2024

This could probably be cleaner, give me a minute to examine.

from projectm.

revmischa avatar revmischa commented on May 25, 2024

is defined() a preprocessor keyword or something? i've never come across it before

from projectm.

splbio avatar splbio commented on May 25, 2024

yes it is, about to upload a patch with that as an example, but I can't build this today so maybe it can be improved upon.

from projectm.

revmischa avatar revmischa commented on May 25, 2024

thanks! if one of you wants to open a new PR feel free.

from projectm.

revmischa avatar revmischa commented on May 25, 2024

also see the configure.ac link i added earlier.. are there any flags needed for linking on freebsd? apple needs -framework CoreFoundation and limux needs -ldl. idk what bsd needs.

from projectm.

yurivict avatar yurivict commented on May 25, 2024

There is no -ldl on BSDs.

from projectm.

revmischa avatar revmischa commented on May 25, 2024

Closing in favour of #41

from projectm.

Related Issues (20)

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.