Using std::thread with Allegro5 (c++11)
1||=== Build: Release in LPG2 (compiler: GNU GCC Compiler) ===| 2C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\4.9.2\..\..\..\libpthread.a(libwinpthread_la-thread.o):thread.c|| multiple definition of `pthread_equal'| 3C:\Program Files (x86)\CodeBlocks\MinGW\lib\liballegro_monolith.dll.a(d005306.o)|| first defined here| 4||error: ld returned 1 exit status| 5||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===| 6

the obvious workaround is to use ALLEGRO_THREAD instead, but it would still be nice if this was fixed


What binaries are you using? It seems like your binaries link libpthread statically, so the solution is to just grab binaries that don't do that.

Edgar Reynaldo

He's linking with 'liballegro_monolith.dll.a'. That shouldn't be linked to pthread statically, so perhaps there's something wrong with the build?

Thread #616724. Printed from