|
Is Allegro C or C++? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I compiled ex_prim.c with mingw32-g++ after fixing two incompatible pointer assignments on lines 579 and 600 of the 5.1.9 release, but isn't that kind of funny? I thought the standard for Allegro programs was C99 but that fails to build (missing def of off64_t). If I compile ex_prim.c with mingw32-gcc it fails to link due to undefined references to operator new in the static allegro monolith which is explained by gcc not linking to libstdc++. So what is Allegro these days? Is it C or C++? And how does that affect exporting symbols to other languages? How do you deal with the name mangling? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
AJKproductions
Member #15,860
January 2015
|
I am using visual studio 2013, and allegro 5.0.10. I think it is c++, however that might just be the version I downloaded... |
pkrcel
Member #14,001
February 2012
|
Allegro is C90 strict EXCEPT a handful of files for D3D and DSOUND that HAVE to be .cpp files. `off64_t' is not defined by the C standard so...I can't tell what's wrong there....most prolly your MINGW <sys/types.h> has something wonky in there? Also, off64_t type MIGHT not be defined since you are on a 32-bit system, and in that case it is defined only on a certain set of conditions. I can't tell why it's looking after that, since Allegro should handle off_t instead IIRC but I can't really tell to be honest. Anyway what I get when building (albeit the 64-bit version) is a C dll (also for the addons). It is unlikely that Google shares your distaste for capitalism. - Derezo |
Thomas Fjellstrom
Member #476
June 2000
|
The api is C, but the windows code uses C++ in the Direct3d driver to ease the implementation. The C D3D/DX apis are a horrible pain, or so I hear. -- |
|