Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » building 4.9 with MSVC 10

This thread is locked; no one can reply to it. rss feed Print
building 4.9 with MSVC 10
Matthew Leverton
Supreme Loser
January 1999
avatar

Attached is cmake-vc10.zip, which is an altered version of CMake I made from 2.8.2. Install the official version and then replace the cmake.exe file.

It should add support for building Allegro 4.9 with MSVC 10.

Other notes:

  • Set -DCMAKE_INSTALL_PREFIX=c:\allegro\install\ (or some folder) to get the installed headers to copy correctly.


  • Using nmake seems to work better than project files. Don't specify a generator via -G and cmake will build nmake makefiles. Just type nmake after building the project files.

Mark Oates
Member #1,146
March 2001
avatar

In readme:

> cd allegro
> mkdir build
> mkdir install
> cmake .. -DCMAKE_INSTALL_PREFIX=c:\allegro\install\
> nmake
> nmake install

you need

> cd install (oops)
> cd build

before the cmake.

[edit]

I had to include these lines in the instructions, prior to the cmake line:

SET LIB=c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\lib\x86;%LIB%;c:\mylibs
SET INCLUDE=c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\include;%LIB%;%INCLUDE%;c:\mylibs

Also, the build stopped at 72% with a fatal error:

[ 72%] Built target ex_audio_props
Scanning dependencies of target ex_audio_simple
[ 72%] Building C object examples/CMakeFiles/ex_audio_simple.dir/ex_audio_simple
.c.obj
ex_audio_simple.c
Linking C executable ex_audio_simple.exe
MT failed. with 31
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"' :
return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

c:\allegro\build>

Matthew Leverton
Supreme Loser
January 1999
avatar

Do the project files work? (-G "Visual Studio 10")

Mark Oates
Member #1,146
March 2001
avatar

Yes. Short story is the -DCMAKE_INSTALL_PREFIX didn't change anything, however.

To be thorough, I first ran cmake without -DCMAKE_INSTALL_PREFIX=c:\allegro\install\

This was that process:

  1. created folder c:\allegro

  2. extracted all the source files into that directory

  3. opened VS Command Prompt

  4. went to c:\allegro

  5. mkdir install

  6. mkdir build

  7. ran a .bat file containing those two lines (from the previous post)

  8. cd build

  9. cmake .. -G "Visual Studio 10"

  10. (lots of missing zlibs and what-nots)

  11. Outside of the console, opened "ALL_BUILD.vcxproj"

  12. From the menu, "Build Project"

Everything was built (Except for allegro_ttf, and allegro_physfs), no errors. The dll files are correctly named, and the exe requested the correct names of those dlls. I was using these special conditions for compiling the program:

  1. This is off a fresh uninstall/install of MSVC during which I removed all of the existing allegro libs and header files from its internal folders.

  2. This simple program

  3. The lib files are taken directly from the C:\allegro\ folder. C:\allegro\build\lib\RelWithDebInfo\allegro.lib; and C:\allegro\build\lib\RelWithDebInfo\allegro_color.lib; to be exact.

  4. I added the directory c:\allegro\include to "V++ Directories > Include Directories"

  5. (There was nothing inside the "install" folder.)

  6. had to copy the header files from each of the C:\allegro\addons\*\allegro5 folders to the c:\allegro\include folder

  7. had to copy the header files from C:\allegro\build\include\allegro5 folder to the c:\allegro\include folder, also.

  8. copied the dll files into the folder with the exe.

Then I erased everything and ran the process again, this time with the -DCMAKE_INSTALL_PREFIX=c:\allegro\install\ switch (or whatever it's called).

  1. cd allegro

  2. mkdir build

  3. mkdir install

  4. (ran the bat file)

  5. cd build

  6. cmake .. -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX=c:\allegro\install\

  7. (same missing dependencies)

  8. Outside of the console, opened "ALL_BUILD.vcxproj"

  9. From the menu, "Build Project"

  10. "93 succeeded, 0 failed, 0 up-to-date, 1 skipped." same as before

Hmm... everything is the same, including all of the header files and lib files in the same locations. And "install" is empty.

The dlls were named correctly and the program compiled and ran.

Matthew Leverton
Supreme Loser
January 1999
avatar

It's best to start in a clean build folder if you change something.

To install, run nmake install or from within MSVC, right click on the INSTALL project and choose build. This will copy the library, dlls, and headers (for the addons you are currently using) into the install location.

Outside of the console, opened "ALL_BUILD.vcxproj"

I think allegro.sln is the main one.

Quote:

I added the directory c:\allegro\include to "V++ Directories > Include Directories"

You really shouldn't add stuff to the c:\allegro\include location. (Thus, I suggest c:\allegro\install or some other alternative path.)

Mark Oates
Member #1,146
March 2001
avatar

To install, run nmake install or from within MSVC, right click on the INSTALL project and choose build. This will copy the library, dlls, and headers (for the addons you are currently using) into the install location.

Hmm, it installed everything into the MSVC folders.

#SelectExpand
11>------ Build started: Project: copy_example_data, Configuration: RelWithDebInfo Win32 ------ 22>------ Build started: Project: copy_demo_data, Configuration: RelWithDebInfo Win32 ------ 32> Generating data/gfx/background.tga 42> Generating data/gfx/Icon.icns 52> Generating data/gfx/large_asteroid.tga 62> Generating data/gfx/large_bullet.tga 72> Generating data/gfx/large_explosion_0.tga 82> Generating data/gfx/large_explosion_1.tga 92> Generating data/gfx/large_explosion_2.tga 102> Generating data/gfx/large_explosion_3.tga 112> Generating data/gfx/large_explosion_4.tga 122> Generating data/gfx/large_font.tga 132> Generating data/gfx/life_powerup.tga 142> Generating data/gfx/logo.tga 152> Generating data/gfx/medium_asteroid.tga 162> Generating data/gfx/ship.tga 171> Generating data/a4_font.tga 181> Generating data/allegro.pcx 191> Generating data/bkg.png 201> Generating data/bmpfont.tga 211> Generating data/cursor.tga 221> Generating data/DejaVuSans.ttf 231> Generating data/exconfig.ini 241> Generating data/ex_physfs.zip 251> Generating data/fakeamp.bmp 261> Generating data/fixed_font.tga 271> Generating data/font.tga 281> Generating data/icon.tga 291> Generating data/mask.pcx 301> Generating data/mysha.pcx 311> Generating data/mysha.tga 321> Generating data/mysha256x256.png 331> Generating data/planet.pcx 341> Generating data/sample.cfg 351> Generating data/testing.ogg 361> Generating data/texture.tga 372> Generating data/gfx/ship_icon.tga 382> Generating data/gfx/ship_trans.tga 392> Generating data/gfx/small_asteroid.tga 402> Generating data/gfx/small_bullet.tga 412> Generating data/gfx/small_explosion_0.tga 422> Generating data/gfx/small_explosion_1.tga 432> Generating data/gfx/small_explosion_2.tga 442> Generating data/gfx/small_explosion_3.tga 452> Generating data/gfx/small_explosion_4.tga 462> Generating data/gfx/small_font.tga 472> Generating data/gfx/trail.tga 482> Generating data/gfx/ufo0.tga 492> Generating data/gfx/ufo1.tga 502> Generating data/gfx/ufo2.tga 512> Generating data/gfx/weapon_powerup.tga 522> Generating data/sfx/big_explosion.ogg 532> Generating data/sfx/collision.ogg 542> Generating data/sfx/fire_large.ogg 552> Generating data/sfx/fire_small.ogg 562> Generating data/sfx/game_music.ogg 572> Generating data/sfx/powerup.ogg 582> Generating data/sfx/small_explosion.ogg 592> Generating data/sfx/title_music.ogg 603>------ Build started: Project: INSTALL, Configuration: RelWithDebInfo Win32 ------ 613> -- Install configuration: "RelWithDebInfo" 623> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro.lib 633> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro-4.9.dll 643> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro5.h 653> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro.h 663> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/alinline.h 673> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/altime.h 683> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/base.h 693> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/bitmap_io.h 703> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/bitmap_new.h 713> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/color_new.h 723> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/config.h 733> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/debug.h 743> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/display_new.h 753> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/error.h 763> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/events.h 773> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/file.h 783> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/fixed.h 793> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/fmaths.h 803> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/fshook.h 813> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/joystick.h 823> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/keyboard.h 833> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/keycodes.h 843> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/memory.h 853> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/mouse.h 863> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/path.h 873> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_opengl.h 883> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_direct3d.h 893> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/system_new.h 903> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/threads.h 913> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/tls.h 923> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/timer.h 933> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/transformations.h 943> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/utf8.h 953> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/inline/fmaths.inl 963> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern.h 973> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_atomicops.h 983> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_bitmap.h 993> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_convert.h 1003> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_display.h 1013> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_dtor.h 1023> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_events.h 1033> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_float.h 1043> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_fshook.h 1053> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_joystick.h 1063> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_keyboard.h 1073> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_mouse.h 1083> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_opengl.h 1093> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_pixels.h 1103> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_system.h 1113> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_thread.h 1123> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/aintern_vector.h 1133> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/internal/alconfig.h 1143> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/aintlnx.h 1153> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/aintosx.h 1163> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/aintunix.h 1173> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/aintuthr.h 1183> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/aintwin.h 1193> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/aintwthr.h 1203> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/al386gcc.h 1213> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/al386vc.h 1223> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/al386wat.h 1233> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/albcc32.h 1243> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/almngw32.h 1253> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/almsvc.h 1263> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/alosx.h 1273> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/alosxcfg.h 1283> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/alucfg.h 1293> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/alunix.h 1303> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/alwatcom.h 1313> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/alwin.h 1323> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/astdbool.h 1333> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/astdint.h 1343> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_windows.h 1353> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/gl_ext.h 1363> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/gl_ext_alias.h 1373> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/gl_ext_defs.h 1383> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/glx_ext_alias.h 1393> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/glx_ext_defs.h 1403> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/wgl_ext_alias.h 1413> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/wgl_ext_defs.h 1423> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/gl_ext_api.h 1433> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/gl_ext_list.h 1443> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/glx_ext_api.h 1453> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/glx_ext_list.h 1463> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/wgl_ext_api.h 1473> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/opengl/GLext/wgl_ext_list.h 1483> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/platform/alplatf.h 1493> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_primitives.lib 1503> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_primitives-4.9.dll 1513> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_primitives.h 1523> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_image.lib 1533> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_image-4.9.dll 1543> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_image.h 1553> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_font.lib 1563> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_font-4.9.dll 1573> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_font.h 1583> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_audio.lib 1593> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_audio-4.9.dll 1603> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_audio.h 1613> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_acodec.lib 1623> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_acodec-4.9.dll 1633> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_acodec.h 1643> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_color.lib 1653> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_color-4.9.dll 1663> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_color.h 1673> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_memfile.lib 1683> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_memfile-4.9.dll 1693> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/memfile.h 1703> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_dialog.lib 1713> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_dialog-4.9.dll 1723> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/allegro5/allegro_native_dialog.h 1733> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/allegro_main.lib 1743> -- Installing: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/allegro_main-4.9.dll 175========== Build: 3 succeeded, 0 failed, 91 up-to-date, 0 skipped ==========

This is with the prefix

  • cmake .. -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX=c:\allegro\install\

[edit] I tried it again in a "c:\allegro2" folder and got the same results.

Matthew Leverton
Supreme Loser
January 1999
avatar

You should see this at the top of allegro/build/cmake_install.cmake:

# Install script for directory: C:/allegro/4.9

# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  SET(CMAKE_INSTALL_PREFIX "C:/allegro/install")
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

Mark Oates
Member #1,146
March 2001
avatar

I ran it again in a fresh folder c:\allegro3:

mkdir build
mkdir install
cd build
SET LIB=c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\lib\x86;%LIB%;c:\mylibs
SET INCLUDE=c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\include;%LIB%;%INCLUDE%;c:\mylibs
cmake .. -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX=c:\allegro3\install\

in c:\allegro3\build\cmake_install.cmake:

# Install script for directory: C:/allegro3

# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  SET(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC")
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

Matthew Leverton
Supreme Loser
January 1999
avatar

It works for me. Don't know why it doesn't work for you. Editing that file by hand would probably put it in the place you request.

Mark Oates
Member #1,146
March 2001
avatar

It works for me. Don't know why it doesn't work for you.

I have a curse when it comes to building, that's why. ;)

Thomas Fjellstrom
Member #476
June 2000
avatar

I have a curse when it comes to building, that's why. ;)

Are you sure you're using Matthew's modified CMake?

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Matthew Leverton
Supreme Loser
January 1999
avatar

That shouldn't affect CMAKE_INSTALL_PREFIX. The only thing I changed was the 2010 generator. (i.e., nmake makefiles should work correctly even with the original CMake.)

Thomas Fjellstrom
Member #476
June 2000
avatar

Maybe this has something to do with it:

    if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
        set(CMAKE_INSTALL_PREFIX ${VCINSTALLDIR}
            CACHE PATH "Install path prefix, prepended onto install directories."
            FORCE)
    endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Don Freeman
Member #5,110
October 2004
avatar

I've not tried the nmake thing yet, but using cmake and the resulting MSVC10 project everything compiles fine. I don't get any sound running any of the acodec addon examples (ex_acodec and ex_acodec_multi). ex_audio_props works, but dies on exit. The demo (named demo) does not work...at all. The speed demo works perfect...very nice too, if I do say so! :) Seems to be an issue with ogg and mp3 files. Any ideas or suggestions? Thanks to all who've been working on this! I am very excited!!!

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Matthew Leverton
Supreme Loser
January 1999
avatar

You need to have the appropriate third party libraries available at Allegro build time if you expect the functionality that they provide to work.

Don Freeman
Member #5,110
October 2004
avatar

I do, but thanks. ;) I did notice (by chance, because cmake doesn't say it more than once) that is said checking to see if vorbis compiles....fails. Been trying to find a version that compiles for MSVC10. :( By the way, here is my CMakeCache file. Ok, so the audio addons work for wav files, but not ogg...I guess because of the failure mentioned above. Any links? Also, the ex_stream_file program remains in the task manager even after it exits.

Edit:
I'm also thinking of switching back to Visual Studio 2008...there are some nice features in 2010, but still a LOT of headaches as well. :(

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Michał Cichoń
Member #11,736
March 2010

Maybe this can help you.

allegro_acodec have to be setup to use libogg and libvorbis. This will enable support for ogg files.

There is no official support for mp3 files because of licensing issues, but if you are interested I may provide you allegro_mpeg addon which allow Allegro to play mp1, mp2 and mp3 files. But keep in mind, you probably have to pay a fee for decoder ($0.75 per unit) to the patent owner.

"God starts from scratch too"
Windows Allegro Build Repo: http://targonski.nazwa.pl/thedmd/allegro/

Don Freeman
Member #5,110
October 2004
avatar

If you could tell me your "secret" to building libvorbis, libogg, and friends with MSVC10...that should solve my problem. I downloaded the source for each from the main page, but when I load the projects to get converted into MSVC10 projects...it fails saying corrupt project files or such.

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Michał Cichoń
Member #11,736
March 2010

The solution is: "do it yourself", and continuing: "if you want to keep control to the ground".

For all those libraries projects were created from scratch. This is easy thing to do:
- create static project, for example libvorbis
- add files (I took list of those from library build system)
- setup library specific definitions
- setup compiler settings which suits to your needs
- click build

After you create projects for all libraries you need, last thing is to link them with Allegro. It is very likely you encounter some unresolved symbols. Those are caused usually by wrong definition or missing file.

This approach is good for single library with a few setups (Debug, Release, Debug MT, Release MT). For a few of them maintaining them became a very time consuming problem.

I end up with a script which create final projects base on predefined template.

In some cases static project are even not available (ex: OpenAL). Those are more tricky one, because some part of code may relay on DLL facilities (initialization/finalization in DllMain).

Whole process took me near a month of patching, scripting, testing and compiling. So this is approximate time you spend on that if you actually decide to do this.

Remark:
I'm using Code::Block projects and workspaces, because it is portable and support multiple compilers. Those project and workspaces are generated by Lua script (similar to premake), every time they are needed.

I'm recommending you to use those already compiled binaries. That's why I did that stuff anyway.

Please, let me know what you think about all this.

"God starts from scratch too"
Windows Allegro Build Repo: http://targonski.nazwa.pl/thedmd/allegro/

Go to: