aconstlink / motor

Software Framework for Audio/Visual/Interactive Real-Time Applications
MIT License
2 stars 0 forks source link

Gcc multiple definitions of the gl functions #29

Closed aconstlink closed 8 months ago

aconstlink commented 8 months ago

It seems that GCC changed the default to -Wno-fcommon, so all the declared gl function pointers are seen as definitions. This caused the linker ld to complain about multiple definitions of all the gl function pointers.

The solution may be to use the -fcommon flag for the GCC C Compiler in CMake and add the extern keyword to the api.in.h configure file like so:

#define MOTOR_@LIB_NAME_UPPER@_API_C extern
aconstlink commented 8 months ago

I just can not believe that I am still doing this. This feels totally redundant and unnecessary. Lets try using the current solution which just compiled on my computer and appveyor. I am so frustrated with this stuff, every time you change something on the engine, you get some new obscure compiler/linker fuck up!

In my opinion, it works better on windows with wgl and gl than glx and gl! Why am I just doing Linux anymore?