我從來沒有編譯過使用CMake的程序。我已經下載了最新的Allegro SVN並嘗試多次編譯它,但沒有運氣。我看了整個互聯網,並沒有發現任何有用的東西。我選擇了爲Visual Studio 9 2008進行編譯。我不知道我必須在哪裏鏈接源代碼和構建版本。 Allegro文件很混亂。我不知道這是否有用,但我也掌握了lib文件。如果有人知道我應該如何鏈接這些文件來正確編譯,我會很高興。如何使用CMake 2.8編譯Allegro 4.9.14
這裏是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
而且,這裏是事件列表,錯誤勢必會發現裏面:
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!
你可以發佈你的cmakecache.txt嗎?也可能是構建錯誤 – 2010-02-11 02:43:36
I稱爲allegro開發人員,看看他們是否可以幫助... 我使用4.3.x版本我自己和該版本不使用CMake所以我不能幫你 – speeder 2010-02-11 02:54:31
哇,它的工作,Tomasu和Trentg出現:) – speeder 2010-02-11 03:22:26