[SFML] et ruby.h, compilation dificile
Voila,
Je suis actuellement sur la conception d'une application multimédia interpretant du code ruby pour gérer les affichages et autres, dans une fenêtre. J'avais commencé avec SDL de manière très satisfaisante, cependant le nombre DLL à coller dans le projet devenait assez conséquent. Je me suis donc mis à tester l'API SFML, après quelques tests simple en suivant les tutoriaux, cela me semblait possible de migrer mon projet. Hors voici mon problème; comme à mon habitude, pour tester les compatibilités de divers fichiers inclus, je test une compilation avec ce code :
Code:
1 2 3 4 5 6 7
| #include <SFML/System.hpp>
#include "ruby.h"
int main( int argc, char *argv[] ) {
return 0;
} |
Rien de trenscendant, cependant voici mon log de compilation :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| -------------- Build: Debug in Ruby_test ---------------
Compiling: main.cpp
In file included from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/defines.h:183,
from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/ruby.h:37,
from G:\documents\Tony\dev_c++\Ruby_test\main.cpp:3:
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:172: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:172: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:173: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:173: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:174: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:174: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:175: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:175: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:175: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:175: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:175: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:175: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:179: error: `u_long' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:179: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:188: error: `SOCKET' does not name a type
In file included from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/ruby.h:718,
from G:\documents\Tony\dev_c++\Ruby_test\main.cpp:3:
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/missing.h:71:1: warning: "isinf" redefined
In file included from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:64,
from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/defines.h:183,
from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/ruby.h:37,
from G:\documents\Tony\dev_c++\Ruby_test\main.cpp:3:
D:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:346:1: warning: this is the location of the previous definition
In file included from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/ruby.h:719,
from G:\documents\Tony\dev_c++\Ruby_test\main.cpp:3:
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/intern.h:216: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/intern.h:216: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/intern.h:216: error: `fd_set' has not been declared
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/intern.h:216: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/intern.h:216: error: ISO C++ forbids declaration of `parameter' with no type
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/intern.h:216: error: ISO C++ forbids declaration of `parameter' with no type
Process terminated with status 1 (0 minutes, 0 seconds)
21 errors, 2 warnings |
et le log, en inversant les 2 fichiers inclus :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
-------------- Build: Debug in Ruby_test ---------------
Compiling: main.cpp
In file included from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/ruby.h:718,
from G:\documents\Tony\dev_c++\Ruby_test\main.cpp:1:
D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/missing.h:71:1: warning: "isinf" redefined
In file included from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/win32/win32.h:64,
from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/defines.h:183,
from D:/Program Files/Ruby/lib/ruby/1.8/i386-mswin32/ruby.h:37,
from G:\documents\Tony\dev_c++\Ruby_test\main.cpp:1:
D:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:346:1: warning: this is the location of the previous definition
In file included from D:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SFML/System.hpp:37,
from G:\documents\Tony\dev_c++\Ruby_test\main.cpp:2:
D:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SFML/System/Sleep.hpp:42: error: expected unqualified-id before "void"
D:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SFML/System/Sleep.hpp:42: error: expected `)' before "void"
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 2 warnings |
Je précise que tous mes chemins vers les fichiers nécessaires et mes liens sur les librairies sont correctes.
Si quelqu'un à une idée, je suis preneur, car pour le moment, si la SFML est déjà incompatible avec l'interpreteur Ruby, je ne prendrais pas le risque de migrer tous mes autres projets de moteur graphique sur cette API.