2010-02-11 5 views
0

Je n'ai jamais compilé de programmes avec CMake. J'ai téléchargé le dernier SVN d'Allegro et essayé de le compiler plusieurs fois, mais pas de chance. J'ai regardé partout sur Internet et n'ai rien trouvé d'utile. J'ai choisi de le compiler pour Visual Studio 9 2008. Je ne sais pas vraiment où je dois lier la source et la construction. Les fichiers Allegro sont déroutants. Je ne sais pas si cela peut être utile, mais j'ai aussi obtenu les fichiers lib. Si quelqu'un sait comment je devrais lier les fichiers pour compiler correctement, je serais très heureux.Comment compiler Allegro 4.9.14 en utilisant CMake 2.8

Voici le contenu CMakeCash.Text:

# This is the CMakeCache file. 
# For build in directory: c:/lib/Allegro4.9 
# You can edit this file to change values found and used by cmake. 
# If you do not want to change any of the values, simply exit the editor. 
# If you do want to change a value, simply edit, save, and exit the editor. 
# The syntax for the file is as follows: 
# KEY:TYPE=VALUE 
# KEY is the name of a variable in the cache. 
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!. 
# VALUE is the current value for the KEY. 

######################## 
# EXTERNAL cache entries 
######################## 


######################## 
# INTERNAL cache entries 
######################## 

//This is the directory where this CMakeCache.txt was created 
CMAKE_CACHEFILE_DIR:INTERNAL=c:/lib/Allegro4.9 
//Major version of cmake used to create the current loaded cache 
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2 
//Minor version of cmake used to create the current loaded cache 
CMAKE_CACHE_MINOR_VERSION:INTERNAL=8 
//Patch version of cmake used to create the current loaded cache 
CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 

Aussi, voici la liste des événements, l'erreur est liée à trouver à l'intérieur:

Check for working C compiler: cl 
Check for working C compiler: cl -- works 
Detecting C compiler ABI info 
Detecting C compiler ABI info - done 
Check for working CXX compiler: cl 
Check for working CXX compiler: cl -- works 
Detecting CXX compiler ABI info 
Detecting CXX compiler ABI info - done 
Guessed MSVC directory: cl 
Allowing MSVC to use SSE instructions 
Check if the system is big endian 
Searching 16 bit integer 
Looking for sys/types.h 
Looking for sys/types.h - found 
Looking for stdint.h 
Looking for stdint.h - not found 
Looking for stddef.h 
Looking for stddef.h - found 
Check size of unsigned short 
Check size of unsigned short - done 
Using unsigned short 
Check if the system is big endian - little endian 
Looking for include files ALLEGRO_HAVE_DIRENT_H 
Looking for include files ALLEGRO_HAVE_DIRENT_H - not found. 
Looking for include files ALLEGRO_HAVE_INTTYPES_H 
Looking for include files ALLEGRO_HAVE_INTTYPES_H - not found. 
Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H 
Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H - not found. 
Looking for include files ALLEGRO_HAVE_STDBOOL_H 
Looking for include files ALLEGRO_HAVE_STDBOOL_H - not found. 
Looking for include files ALLEGRO_HAVE_STDINT_H 
Looking for include files ALLEGRO_HAVE_STDINT_H - not found. 
Looking for include files ALLEGRO_HAVE_SYS_IO_H 
Looking for include files ALLEGRO_HAVE_SYS_IO_H - not found. 
Looking for include files ALLEGRO_HAVE_SYS_STAT_H 
Looking for include files ALLEGRO_HAVE_SYS_STAT_H - found 
Looking for include files ALLEGRO_HAVE_SYS_TIME_H 
Looking for include files ALLEGRO_HAVE_SYS_TIME_H - not found. 
Looking for include files ALLEGRO_HAVE_TIME_H 
Looking for include files ALLEGRO_HAVE_TIME_H - found 
Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H 
Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H - not found. 
Looking for include files ALLEGRO_HAVE_SYS_TYPES_H 
Looking for include files ALLEGRO_HAVE_SYS_TYPES_H - found 
Looking for include files ALLEGRO_HAVE_SOUNDCARD_H 
Looking for include files ALLEGRO_HAVE_SOUNDCARD_H - not found. 
Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H 
Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H - not found. 
Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H 
Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H - not found. 
Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H 
Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H - not found. 
Looking for include files ALLEGRO_HAVE_OSATOMIC_H 
Looking for include files ALLEGRO_HAVE_OSATOMIC_H - not found. 
Looking for getexecname 
Looking for getexecname - not found 
Looking for mkstemp 
Looking for mkstemp - not found 
Looking for mmap 
Looking for mmap - not found 
Looking for mprotect 
Looking for mprotect - not found 
Looking for sched_yield 
Looking for sched_yield - not found 
Looking for stricmp 
Looking for stricmp - found 
Looking for strlwr 
Looking for strlwr - found 
Looking for strupr 
Looking for strupr - found 
Looking for sysconf 
Looking for sysconf - not found 
Looking for fseeko 
Looking for fseeko - not found 
Looking for ftello 
Looking for ftello - not found 
Check size of _Bool 
Check size of _Bool - failed 
Performing Test ALLEGRO_HAVE_PROCFS_ARGCV 
Performing Test ALLEGRO_HAVE_PROCFS_ARGCV - Failed 
Performing Test ALLEGRO_HAVE_SV_PROCFS_H 
Performing Test ALLEGRO_HAVE_SV_PROCFS_H - Failed 
Performing Test ALLEGRO_HAVE_VA_COPY 
Performing Test ALLEGRO_HAVE_VA_COPY - Failed 
Check if constructors are supported - no 
Could NOT find DINPUT (missing: DINPUT_INCLUDE_DIR DINPUT_LIBRARY) 
CMake Error at CMakeLists.txt:565 (message): 
    Windows port requires DirectInput (not found). 


Configuring incomplete, errors occurred! 
+0

pouvez-vous poster votre cmakecache.txt ?, et peut-être aussi les erreurs de construction –

+0

I appelé allegro devs pour voir si elles peuvent aider ... J'utilise la version 4.3.x moi-même et cette version n'utilise pas CMake Donc je ne peux pas vous aider – speeder

+0

Wow ça a marché, Tomasu et Trentg sont apparus :) – speeder

Répondre

1

Si CMake ne parvient pas, il devrait vous dire ce qui s'est mal passé, c'est-à-dire: s'il vous manque des dépendances requises.

S'il vous plaît signaler les erreurs réelles que vous voyez de cmake, et/ou le compilateur si cmake lui-même n'a pas échoué.

modifier:

Là vous allez, vos erreurs:

n'a pas pu trouver DINPUT (manquante: DINPUT_INCLUDE_DIR DINPUT_LIBRARY) CMake Erreur à CMakeLists.txt: 565 (message): le port Windows nécessite DirectInput (pas trouvé).

C'est un problème courant qui est corrigé dans les versions plus récentes. 4.9.14 est ancien. S'il vous plaît mettre à jour vers la dernière version, ou même directement à partir de SVN.

+0

Je viens de mettre à jour avec le CMakeCache et aussi les événements de construction. Les erreurs devraient être là. – user258916

+0

Et j'ai mis à jour ma réponse;) – Tomasu

+0

Vraiment? Comment 4.9.14 peut-il être plus âgé? C'est à peu près la version la plus récente. Bon, autant essayer avec l'ancienne version qui est plus stable. Cela peut être la solution. – user258916

1

D'abord, exécutez cmake à partir de l'invite de commande MSVC et non de l'invite de commande standard. Définissez ensuite les variables d'environnement INCLUDE et LIB pour qu'elles pointent vers votre installation directx. Par exemple:

ensemble incluent = C: \ Program Files \ Microsoft DirectX SDK (Août 2009) \ Inclure mettre LIB = C: \ Program Files \ Microsoft DirectX SDK (Août 2009) \ lib \ x86

Notez l'absence de guillemets (") N'utilisez pas de guillemets, puis supprimez CMakeCache.txt et exécutez à nouveau cmake, et il devrait trouver directx

+0

Que voulez-vous dire par l'invite de commande MSVC? – user258916

+0

Très bien, maintenant je comprends ce que vous voulez dire. Aussi, je télécharge maintenant le Microsoft DirectX SDK (août 2009) Je vais l'installer et essayer la commande que vous avez montrée. Merci à tous pour l'aide! – user258916

Questions connexes