V

Avatar

AntTweakBar with Core GL OSX

EDIT: As pointed to me by Christoph Ruß, here’s a solution for this problem without the need to change the code

“I would like to add that the problem really is that the OpenGL library can not be found due to it simply not being in the path variable for the dynamic linker. Your solution to provide a fixed path on compile-time surely works, but may not be ideal, if you want to avoid re-compiling the lib.

I would recommend adjusting your DYLD_LIBRARYPATH instead. This could go in ~/.bash_profile:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/System/Library/Frameworks/OpenGL.framework/Versions/Current/”

I’ve been trying to get AntTweakBar (version 116) to compile and run as my default GUI but ended up finding some obstacles that took me a couple days to find a solution. Should have been a smooth ride, but ended up in a couple of crazy days and an easy solution found just minutes ago.

Let’s begin with some information. It was pretty easy to compile following the instructions found on the website. Under Windows it took a few minutes to get it up and running, even as a Static Library. Problems began when i’ve tried to compile on OS X 10.9:

  1. It reports 2 errors with the declaration of glDrawElements and glShaderSource. It differs from the declaration from GL header.
    Easy fix: Just copy the declaration from GL header to ATB.
  2. Compiling as a static library was OK. After reading it’s change log i realised they have static library support but i had taken the longest path and was trying to get it done manually, so it took me more time that i had planned.

After some time, i finally got the wanted the static library compiled and linking successfully, i got the following error:

“AntTweakBar: OpenGL Core Profile functions cannot be loaded.
ERROR(AntTweakBar) >> Cannot load OpenGL library dynamically”

Tracked that problem down to the line:

gl_dyld = dlopen("OpenGL", RTLD_LAZY );

gl_dyld was always NULL, which tells me the library wasn’t being loaded/found (really?!). The fix i found is to change the first parameter to use the full path to OpenGL as follows:

gl_dyld = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY );

 

It is a very simple fix and worked just fine for me, but, it took me a few days of frustration and travel. After all i was supposed to get this up and running last Thursday. It’s nearly one week later.

No Comments, Comment or Ping

  1. pharmeasy - Mar 20th, 2019
  2. Cialis generico - Mar 20th, 2019
  3. tadalafil - Mar 23rd, 2019
  4. Generic for cialis - Mar 27th, 2019
  5. cialis 20 mg - Mar 29th, 2019
  6. Cialis - Mar 29th, 2019
  7. viagra tablets - Mar 30th, 2019
  8. cialis for sale cheap uk - Apr 6th, 2019
  9. levitra prices at cvs - Apr 17th, 2019
  10. generic levitra 20mg - Apr 21st, 2019
  11. levitra 20 mg cost - Apr 23rd, 2019
  12. online casino games - Apr 25th, 2019
  13. levitra prices at cvs - May 7th, 2019
  14. cialis 5 mg - Jun 12th, 2019
  15. levitra 10 mg prezzo - Jun 24th, 2019
  16. viagra canada - Jun 26th, 2019
  17. generic viagra online - Jun 26th, 2019
  18. buy viagra - Jun 26th, 2019
  19. canada pharmacies - Jun 28th, 2019
  20. buy cialis online - Jun 28th, 2019
  21. canadian pharcharmy - Jun 28th, 2019
  22. online pharmacy - Jun 28th, 2019
  23. pharmeasy - Jun 28th, 2019
  24. pharmacies - Jun 29th, 2019
  25. canadian pharmacy - Jun 29th, 2019
  26. cialis canada - Jun 30th, 2019
  27. cialis tablets australia - Jun 30th, 2019
  28. cialis tablets - Jun 30th, 2019
  29. generic for cialis - Jun 30th, 2019
  30. cialis online - Jul 1st, 2019
  31. viagra prices - Jul 2nd, 2019
  32. generic viagra - Jul 2nd, 2019
  33. cost of viagra - Jul 2nd, 2019
  34. buy generic viagra - Jul 3rd, 2019
  35. buy viagra online - Jul 3rd, 2019
  36. viagra generic - Jul 4th, 2019
  37. cialis pills - Jul 4th, 2019
  38. canadian pharmacies - Jul 5th, 2019