Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Prototype MSVC binaries

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Prototype MSVC binaries
SiegeLord
Member #7,827
October 2006
avatar

I've been spending my evenings coming up with a reliable procedure to generate binaries for Windows, starting with MSVC. This involves creating a CMake-based build system for 5 of the dependencies, and some minor patches to the existing CMake-based build systems of the remaining 5. While I figure out how to package those changes (and possibly figure out if I can reuse any of this for MinGW), I figured I'd get some of you MSVC users to test the output of this process.

Prototype A5 MSVC 2013 binaries

This package includes the dynamic and static builds for the primary allegro dependencies (no super-optional stuff like OpenAL), most coming in the form of a release binary with debug symbols. The exception for those are DUMB (it is static only) and libpng (it has no debug symbols). Allegro itself is included in triplicate: dynamic release+debug symbols, dynamic debug and static.

Note that this is the WIP version of Allegro (the soon to be 5.1.10), and not any of the releases. This is just for testing.

Try this out, tell me if anything is odd. If it all works out, I plan on using this procedure to create MSVC binaries for 5.1.10 release and on. If I have time, I might try to create some 5.0.10 binaries as well (that's a bit more work, since I'd need to patch some of Allegro's build files).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

GullRaDriel
Member #3,861
September 2003
avatar

Thanks for those using MSCV, though I don't ^^

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Elias
Member #358
May 2000

How hard would it be having a single library, like Mical used to provide?

--
"Either help out or stop whining" - Evert

SiegeLord
Member #7,827
October 2006
avatar

The monolith library is an abomination, but since Allegro's CMake can produce it, it just means another compile or three.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Elias
Member #358
May 2000

Hm, I find the monolith better in just about every way... what is the problem you see with it?

--
"Either help out or stop whining" - Evert

SiegeLord
Member #7,827
October 2006
avatar

It makes you lug around unnecessary DLLs (how often do you need libjpeg?) on all platforms. It is not in the Debian packages, so if you're porting from Windows, you're going to need to adjust your build script for no reason... in fact, it's a giant pain to support from other languages since you need to support both the regular libraries and the monolith, complicating the linking setup. On OSX, it links the main addon which is just plain wrong when you're not using C or C++.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Elias
Member #358
May 2000

Interesting. I like linking in everything, just for the convenience to not have to mess with the build system when I do need it. I did indeed use .jpeg images as background a few times, and they would just work without having to do anything :) As for extra DLLs, I thought Mikal's binary statically links things like libjpeg into the one big .dll? You do not need any other DLLs which is the beauty of it. This can also be done with Allegro's cmake build but you have to explicitly tell cmake to use the static libjpeg instead of the dynamic one.

As for other languages, I always use the monolith version from Python and the main addon is no problem in OSX - when you dynamically load the .dylib it doesn't care if there's a main() function in there or not - dlopen() neither looks for it nor calls it :) And you don't have to support all the versions from another language - the monolith however should make it easier to do dynamic loading - you load just one library and expect all Allegro and dependency symbols in there, instead of requiring a list of which symbols are in which DLL. (The Python addon doesn't have such a list so if you do not use the monolith it will for example look up al_draw_line in each addon DLL...)

Support from build systems (in something using Allegro) indeed is a problem, if you want it to build with the Debian Allegro then you of course have to use whatever version is available there. But that just means that instead of the monolith version you should also add support for the split version in that case. If you're too lazy to do that chances are your build system wouldn't work under Debian either way though :P And it's a matter of changing one line, instead of the "pkg-config allegro-monolith-static-debug-5 --static --libs" I have in my build system you'd replace it with the list of all the addons Debian has.

--
"Either help out or stop whining" - Evert

SiegeLord
Member #7,827
October 2006
avatar

Alright, here's the source packages: https://github.com/SiegeLord/allegro_winpkg By following the readme in the msvc directory, it now should only take 10ish minutes to compile all the dependencies in 2 flavors and Allegro itself in a 8 flavors (monolith included this time).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Bruce Pascoe
Member #15,931
April 2015
avatar

Just want to chime in to say I use a monolith build of Allegro myself, except a static monolith--and wouldn't give it up for anything. I then link statically to all the dependencies (DUMB, libvorbis, etc.) and get a single-executable engine with no external dependencies which is around 2MB in size. I much prefer this, having only one lib for Allegro, than having to add 6-7 extra things to the link line.

Even for dynamic builds, I've found that using the monolith is preferable if you're using more than 1-2 addons. The overall footprint ends up being smaller with the monolith than including the separate Allegro DLLs.

Out of curiosity, are these built using the Windows XP toolchain (Project Settings -> Platform Toolset) or the default one? If using normal one, the resulting app won't work on anything older than Windows 7 due to a missing kernel32 export. I found this out the hard way recently and it's a big part of why I switched to building Allegro myself. The other reason: I needed a x64 build. :P

SiegeLord
Member #7,827
October 2006
avatar

These are built using whatever the default is... and they are 32 bit at the moment. The toolchain bit seems easy enough, not sure how 64 bit works. Contributions welcome ;).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Michael Branin
Member #15,864
January 2015

is there a particular trick to this?

I have downloaded and installed in Windows 8.1 64 bit

nasm-2.11.08-installer.exe
cmake-3.2.2-win32-x86.exe
DXSDK_Jun10.exe

here is my path

C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%Allegro5Dir%\bin;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\; C:\Users\Michael\AppData\Local\nasm;C:\Program Files (x86)\CMake\bin

when I run build_deps.bat I get these errors when it gets to lib jpeg

C:\allegro_winpkg-master\msvc\freetype-2.5.5\build>cd C:\allegro_winpkg-master\m
svc\libjpeg-turbo-1.4.0 || goto :error

C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0>mkdir build

C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0>cd build

C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build>cmake .. -DCMAKE_INSTALL
_PREFIX=../../output -DWITH_TURBOJPEG=false || goto :error
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.21005.1
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_BUILD_TYPE = Release
-- VERSION = 1.4.0, BUILD = 20150425
-- Arithmetic encoding support enabled
-- Arithmetic decoding support enabled
-- TurboJPEG C wrapper disabled
-- TurboJPEG Java wrapper disabled
-- In-memory source/destination managers enabled
-- 32-bit build
-- Install directory = C:/allegro_winpkg-master/msvc/output
-- Building i386 SIMD extensions
-- Configuring done
-- Generating done
-- Build files have been written to: C:/allegro_winpkg-master/msvc/libjpeg-turbo
-1.4.0/build

C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build>cmake --build . --target
INSTALL --config RelWithDebInfo || goto :error
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.34209]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 4/25/2015 6:55:08 PM.
Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\INSTALL.vcxpro
j" on node 1 (default targets).
Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\INSTALL.vcxpro
j" (1) is building "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\ALL
_BUILD.vcxproj" (2) on node 1 (default targets).
Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\ALL_BUILD.vcxp
roj" (2) is building "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\Z
ERO_CHECK.vcxproj" (3) on node 1 (default targets).
PrepareForBuild:
Creating directory "Win32\RelWithDebInfo\ZERO_CHECK\".
Creating directory "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\R
elWithDebInfo\".
Creating directory "Win32\RelWithDebInfo\ZERO_CHECK\ZERO_CHECK.tlog\".
InitializeBuildStatus:
Creating "Win32\RelWithDebInfo\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild"
because "AlwaysCreate" was specified.
CustomBuild:
Checking Build System
CMake does not need to re-run because C:/allegro_winpkg-master/msvc/libjpeg-t
urbo-1.4.0/build/CMakeFiles/generate.stamp is up-to-date.
CMake does not need to re-run because C:/allegro_winpkg-master/msvc/libjpeg-t
urbo-1.4.0/build/simd/CMakeFiles/generate.stamp is up-to-date.
CMake does not need to re-run because C:/allegro_winpkg-master/msvc/libjpeg-t
urbo-1.4.0/build/sharedlib/CMakeFiles/generate.stamp is up-to-date.
FinalizeBuildStatus:
Deleting file "Win32\RelWithDebInfo\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbu
ild".
Touching "Win32\RelWithDebInfo\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuil
dstate".
Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
ZERO_CHECK.vcxproj" (default targets).

Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\ALL_BUILD.vcxp
roj" (2) is building "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\s
haredlib\cjpeg.vcxproj" (4) on node 1 (default targets).
Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\sharedlib\cjpe
g.vcxproj" (4) is building "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\b
uild\sharedlib\jpeg.vcxproj" (5) on node 1 (default targets).
Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\sharedlib\jpeg
.vcxproj" (5) is building "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\bu
ild\simd\simd.vcxproj" (6) on node 1 (default targets).
PrepareForBuild:
Creating directory "Win32\RelWithDebInfo\simd\".
Creating directory "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\s
imd\RelWithDebInfo\".
Creating directory "Win32\RelWithDebInfo\simd\simd.tlog\".
InitializeBuildStatus:
Creating "Win32\RelWithDebInfo\simd\simd.tlog\unsuccessfulbuild" because "Alw
aysCreate" was specified.
CustomBuild:
Building Custom Rule C:/allegro_winpkg-master/msvc/libjpeg-turbo-1.4.0/simd/C
MakeLists.txt
CMake does not need to re-run because C:\allegro_winpkg-master\msvc\libjpeg-t
urbo-1.4.0\build\simd\CMakeFiles\generate.stamp is up-to-date.
Generating RelWithDebInfo/jsimdcpu.obj
'nasm' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targ
ets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\allegro_winpkg-
master\msvc\libjpeg-turbo-1.4.0\build\simd\simd.vcxproj]
Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
simd\simd.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
sharedlib\jpeg.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
sharedlib\cjpeg.vcxproj" (default targets) -- FAILED.

Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\ALL_BUILD.vcxp
roj" (2) is building "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\r
djpgcom.vcxproj" (14) on node 1 (default targets).
PrepareForBuild:
Creating directory "rdjpgcom.dir\RelWithDebInfo\".
Creating directory "rdjpgcom.dir\RelWithDebInfo\rdjpgcom.tlog\".
InitializeBuildStatus:
Creating "rdjpgcom.dir\RelWithDebInfo\rdjpgcom.tlog\unsuccessfulbuild" becaus
e "AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule C:/allegro_winpkg-master/msvc/libjpeg-turbo-1.4.0/CMakeL
ists.txt
CMake does not need to re-run because C:\allegro_winpkg-master\msvc\libjpeg-t
urbo-1.4.0\build\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /I"C:\al
legro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build" /I"C:\allegro_winpkg-mast
er\msvc\libjpeg-turbo-1.4.0" /Zi /nologo /W3 /WX- /O2 /Ob1 /Oy- /D WIN32 /D _
WINDOWS /D NDEBUG /D WITH_SIMD /D "CMAKE_INTDIR=\"RelWithDebInfo\"" /D _MBCS
/Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"rdjpgcom.dir\RelWithDeb
Info\\" /Fd"rdjpgcom.dir\RelWithDebInfo\vc120.pdb" /Gd /TC /wd4996 /analyze-
/errorReport:queue "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\rdjpgco
m.c"
rdjpgcom.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREP
ORT:QUEUE /OUT:"C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\RelWi
thDebInfo\rdjpgcom.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.li
b winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advap
i32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest
:embed /DEBUG /PDB:"C:/allegro_winpkg-master/msvc/libjpeg-turbo-1.4.0/build/R
elWithDebInfo/rdjpgcom.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPA
T /IMPLIB:"C:/allegro_winpkg-master/msvc/libjpeg-turbo-1.4.0/build/RelWithDeb
Info/rdjpgcom.lib" /MACHINE:X86 /SAFESEH /machine:X86 /debug rdjpgcom.dir\Re
lWithDebInfo\rdjpgcom.obj
rdjpgcom.vcxproj -> C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\R
elWithDebInfo\rdjpgcom.exe
FinalizeBuildStatus:
Deleting file "rdjpgcom.dir\RelWithDebInfo\rdjpgcom.tlog\unsuccessfulbuild".
Touching "rdjpgcom.dir\RelWithDebInfo\rdjpgcom.tlog\rdjpgcom.lastbuildstate".
Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
rdjpgcom.vcxproj" (default targets).

Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\ALL_BUILD.vcxp
roj" (2) is building "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\w
rjpgcom.vcxproj" (15) on node 1 (default targets).
PrepareForBuild:
Creating directory "wrjpgcom.dir\RelWithDebInfo\".
Creating directory "wrjpgcom.dir\RelWithDebInfo\wrjpgcom.tlog\".
InitializeBuildStatus:
Creating "wrjpgcom.dir\RelWithDebInfo\wrjpgcom.tlog\unsuccessfulbuild" becaus
e "AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule C:/allegro_winpkg-master/msvc/libjpeg-turbo-1.4.0/CMakeL
ists.txt
CMake does not need to re-run because C:\allegro_winpkg-master\msvc\libjpeg-t
urbo-1.4.0\build\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /I"C:\al
legro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build" /I"C:\allegro_winpkg-mast
er\msvc\libjpeg-turbo-1.4.0" /Zi /nologo /W3 /WX- /O2 /Ob1 /Oy- /D WIN32 /D _
WINDOWS /D NDEBUG /D WITH_SIMD /D "CMAKE_INTDIR=\"RelWithDebInfo\"" /D _MBCS
/Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"wrjpgcom.dir\RelWithDeb
Info\\" /Fd"wrjpgcom.dir\RelWithDebInfo\vc120.pdb" /Gd /TC /wd4996 /analyze-
/errorReport:queue "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\wrjpgco
m.c"
wrjpgcom.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREP
ORT:QUEUE /OUT:"C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\RelWi
thDebInfo\wrjpgcom.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.li
b winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advap
i32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest
:embed /DEBUG /PDB:"C:/allegro_winpkg-master/msvc/libjpeg-turbo-1.4.0/build/R
elWithDebInfo/wrjpgcom.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPA
T /IMPLIB:"C:/allegro_winpkg-master/msvc/libjpeg-turbo-1.4.0/build/RelWithDeb
Info/wrjpgcom.lib" /MACHINE:X86 /SAFESEH /machine:X86 /debug wrjpgcom.dir\Re
lWithDebInfo\wrjpgcom.obj
wrjpgcom.vcxproj -> C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\R
elWithDebInfo\wrjpgcom.exe
FinalizeBuildStatus:
Deleting file "wrjpgcom.dir\RelWithDebInfo\wrjpgcom.tlog\unsuccessfulbuild".
Touching "wrjpgcom.dir\RelWithDebInfo\wrjpgcom.tlog\wrjpgcom.lastbuildstate".
Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
wrjpgcom.vcxproj" (default targets).

Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
ALL_BUILD.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\
INSTALL.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\INSTALL.vcxproj" (defa
ult target) (1) ->
"C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\ALL_BUILD.vcxproj" (de
fault target) (2) ->
"C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\sharedlib\cjpeg.vcxpro
j" (default target) (4) ->
"C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\sharedlib\jpeg.vcxproj
" (default target) (5) ->
"C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build\simd\simd.vcxproj" (de
fault target) (6) ->
(CustomBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.ta
rgets(170,5): error MSB6006: "cmd.exe" exited with code 9009. [C:\allegro_winpk
g-master\msvc\libjpeg-turbo-1.4.0\build\simd\simd.vcxproj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:02.52

C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build>echo Failed with error #
1.
Failed with error #1.

C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build>exit /b 1

C:\allegro_winpkg-master\msvc\libjpeg-turbo-1.4.0\build>

SiegeLord
Member #7,827
October 2006
avatar

Yeah, you need to put nasm into the PATH for the current scripts to work (i.e. just running nasm on the command line should work).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Michael Branin
Member #15,864
January 2015

C:\Users\Michael\AppData\Local\nasm;

this is in my path near the end. is this wrong?

SiegeLord
Member #7,827
October 2006
avatar

If running 'nasm' like that doesn't work, then yes (you might also need to relaunch the terminal/windows explorer to pick up the PATH changes).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Michael Branin
Member #15,864
January 2015

Well I am embarassed to say I had a stupid space in my path. the deps build fine now. When I try to run build_allegro.bat i get several errors

Project "C:\allegro_winpkg-master\msvc\allegro\build\ALL_BUILD.vcxproj" (2) is
building "C:\allegro_winpkg-master\msvc\allegro\build\allegro.vcxproj" (4) on n
ode 1 (default targets).
PrepareForBuild:
Creating directory "allegro.dir\RelWithDebInfo\".
Creating directory "C:\allegro_winpkg-master\msvc\allegro\build\lib\RelWithDe
bInfo\".
Creating directory "allegro.dir\RelWithDebInfo\allegro.tlog\".
InitializeBuildStatus:
Creating "allegro.dir\RelWithDebInfo\allegro.tlog\unsuccessfulbuild" because
"AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule C:/allegro_winpkg-master/msvc/allegro/CMakeLists.txt
CMake does not need to re-run because C:\allegro_winpkg-master\msvc\allegro\b
uild\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /I"C:\Pr
ogram Files (x86)\Microsoft DirectX SDK (June 2010)\Include" /I"C:\allegro_wi
npkg-master\msvc\allegro\include" /I"C:\allegro_winpkg-master\msvc\allegro\bu
ild\include" /Zi /nologo /W3 /WX- /O2 /Ob1 /Oy- /D WIN32 /D _WINDOWS /D CRT
SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D NDEBUG /D ALLEGRO_SRC /D
ALLEGRO_LIB_BUILD /D "CMAKE_INTDIR=\"RelWithDebInfo\"" /D allegro_EXPORTS /D
_WINDLL /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR
/Fo"allegro.dir\RelWithDebInfo\\" /Fd"allegro.dir\RelWithDebInfo\vc120.pdb" /
Gd /TC /analyze- /errorReport:queue "C:\allegro_winpkg-master\msvc\allegro\sr
c\allegro.c" "C:\allegro_winpkg-master\msvc\allegro\src\bitmap.c" "C:\allegro
_winpkg-master\msvc\allegro\src\bitmap_draw.c" "C:\allegro_winpkg-master\msvc
\allegro\src\bitmap_io.c" "C:\allegro_winpkg-master\msvc\allegro\src\bitmap_l
ock.c" "C:\allegro_winpkg-master\msvc\allegro\src\bitmap_pixel.c" "C:\allegro
_winpkg-master\msvc\allegro\src\blenders.c" "C:\allegro_winpkg-master\msvc\al
legro\src\config.c" "C:\allegro_winpkg-master\msvc\allegro\src\convert.c" "C:
\allegro_winpkg-master\msvc\allegro\src\debug.c" "C:\allegro_winpkg-master\ms
vc\allegro\src\display.c" "C:\allegro_winpkg-master\msvc\allegro\src\display_
settings.c" "C:\allegro_winpkg-master\msvc\allegro\src\drawing.c" "C:\allegro
_winpkg-master\msvc\allegro\src\dtor.c" "C:\allegro_winpkg-master\msvc\allegr
o\src\events.c" "C:\allegro_winpkg-master\msvc\allegro\src\evtsrc.c" "C:\alle
gro_winpkg-master\msvc\allegro\src\exitfunc.c" "C:\allegro_winpkg-master\msvc
\allegro\src\file.c" "C:\allegro_winpkg-master\msvc\allegro\src\file_slice.c"
"C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c" "C:\allegro_winpkg-
master\msvc\allegro\src\fshook.c" "C:\allegro_winpkg-master\msvc\allegro\src\
fshook_stdio.c" "C:\allegro_winpkg-master\msvc\allegro\src\fullscreen_mode.c"
"C:\allegro_winpkg-master\msvc\allegro\src\inline.c" "C:\allegro_winpkg-mast
er\msvc\allegro\src\joynu.c" "C:\allegro_winpkg-master\msvc\allegro\src\keybd
nu.c" "C:\allegro_winpkg-master\msvc\allegro\src\libc.c" "C:\allegro_winpkg-m
aster\msvc\allegro\src\math.c" "C:\allegro_winpkg-master\msvc\allegro\src\mem
blit.c" "C:\allegro_winpkg-master\msvc\allegro\src\memdraw.c" "C:\allegro_win
pkg-master\msvc\allegro\src\memory.c" "C:\allegro_winpkg-master\msvc\allegro\
src\monitor.c" "C:\allegro_winpkg-master\msvc\allegro\src\mousenu.c" "C:\alle
gro_winpkg-master\msvc\allegro\src\mouse_cursor.c" "C:\allegro_winpkg-master\
msvc\allegro\src\path.c" "C:\allegro_winpkg-master\msvc\allegro\src\pixels.c"
"C:\allegro_winpkg-master\msvc\allegro\src\system.c" "C:\allegro_winpkg-mast
er\msvc\allegro\src\threads.c" "C:\allegro_winpkg-master\msvc\allegro\src\tim
ernu.c" "C:\allegro_winpkg-master\msvc\allegro\src\tls.c" "C:\allegro_winpkg-
master\msvc\allegro\src\transformations.c" "C:\allegro_winpkg-master\msvc\all
egro\src\tri_soft.c" "C:\allegro_winpkg-master\msvc\allegro\src\utf8.c" "C:\a
llegro_winpkg-master\msvc\allegro\src\misc\aatree.c" "C:\allegro_winpkg-maste
r\msvc\allegro\src\misc\bstrlib.c" "C:\allegro_winpkg-master\msvc\allegro\src
\misc\list.c" "C:\allegro_winpkg-master\msvc\allegro\src\misc\vector.c" "C:\a
llegro_winpkg-master\msvc\allegro\src\win\wjoydrv.c" "C:\allegro_winpkg-maste
r\msvc\allegro\src\win\wjoydxnu.c" "C:\allegro_winpkg-master\msvc\allegro\src
\win\wkeyboard.c" "C:\allegro_winpkg-master\msvc\allegro\src\win\wmcursor.c"
"C:\allegro_winpkg-master\msvc\allegro\src\win\wmouse.c" "C:\allegro_winpkg-m
aster\msvc\allegro\src\win\wsystem.c" "C:\allegro_winpkg-master\msvc\allegro\
src\win\wthread.c" "C:\allegro_winpkg-master\msvc\allegro\src\win\wtime.c" "C
:\allegro_winpkg-master\msvc\allegro\src\win\wunicode.c" "C:\allegro_winpkg-m
aster\msvc\allegro\src\win\wwindow.c" "C:\allegro_winpkg-master\msvc\allegro\
src\win\wxthread.c" "C:\allegro_winpkg-master\msvc\allegro\src\opengl\extensi
ons.c" "C:\allegro_winpkg-master\msvc\allegro\src\opengl\ogl_bitmap.c" "C:\al
legro_winpkg-master\msvc\allegro\src\opengl\ogl_draw.c" "C:\allegro_winpkg-ma
ster\msvc\allegro\src\opengl\ogl_display.c" "C:\allegro_winpkg-master\msvc\al
legro\src\win\wgl_disp.c"
allegro.c
bitmap.c
bitmap_draw.c
bitmap_io.c
bitmap_lock.c
bitmap_pixel.c
blenders.c
config.c
convert.c
debug.c
display.c
display_settings.c
drawing.c
dtor.c
events.c
evtsrc.c
exitfunc.c
file.c
file_slice.c
file_stdio.c
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2065: 'PATH
_MAX' : undeclared identifier [C:\allegro_winpkg-master\msvc\allegro\build\alle
gro.vcxproj]
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2057: expec
ted constant expression [C:\allegro_winpkg-master\msvc\allegro\build\allegro.vc
xproj]
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2466: canno
t allocate an array of constant size 0 [C:\allegro_winpkg-master\msvc\allegro\b
uild\allegro.vcxproj]
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2133: 'file
name' : unknown size [C:\allegro_winpkg-master\msvc\allegro\build\allegro.vcxpr
oj]
Generating Code...
Compiling...
fshook.c
fshook_stdio.c
fullscreen_mode.c
inline.c
joynu.c
keybdnu.c
libc.c
math.c
memblit.c
memdraw.c
memory.c
monitor.c
mousenu.c
mouse_cursor.c
path.c
pixels.c
system.c
threads.c
timernu.c
tls.c
Generating Code...
Compiling...
transformations.c
tri_soft.c
utf8.c
aatree.c
bstrlib.c
list.c
vector.c
wjoydrv.c
wjoydxnu.c
wkeyboard.c
wmcursor.c
wmouse.c
wsystem.c
wthread.c
wtime.c
wunicode.c
wwindow.c
wxthread.c
extensions.c
ogl_bitmap.c
Generating Code...
Compiling...
ogl_draw.c
ogl_display.c
wgl_disp.c
Generating Code...
Done Building Project "C:\allegro_winpkg-master\msvc\allegro\build\allegro.vcxp
roj" (default targets) -- FAILED.

Project "C:\allegro_winpkg-master\msvc\allegro\build\ALL_BUILD.vcxproj" (2) is
building "C:\allegro_winpkg-master\msvc\allegro\build\docs\docs.vcxproj" (16) o
n node 1 (default targets).
PrepareForBuild:
Creating directory "Win32\RelWithDebInfo\docs\".
Creating directory "C:\allegro_winpkg-master\msvc\allegro\build\docs\RelWithD
ebInfo\".
Creating directory "Win32\RelWithDebInfo\docs\docs.tlog\".
InitializeBuildStatus:
Creating "Win32\RelWithDebInfo\docs\docs.tlog\unsuccessfulbuild" because "Alw
aysCreate" was specified.
CustomBuild:
Building Custom Rule C:/allegro_winpkg-master/msvc/allegro/docs/CMakeLists.tx
t
CMake does not need to re-run because C:\allegro_winpkg-master\msvc\allegro\b
uild\docs\CMakeFiles\generate.stamp is up-to-date.
FinalizeBuildStatus:
Deleting file "Win32\RelWithDebInfo\docs\docs.tlog\unsuccessfulbuild".
Touching "Win32\RelWithDebInfo\docs\docs.tlog\docs.lastbuildstate".
Done Building Project "C:\allegro_winpkg-master\msvc\allegro\build\docs\docs.vc
xproj" (default targets).

Done Building Project "C:\allegro_winpkg-master\msvc\allegro\build\ALL_BUILD.vc
xproj" (default targets) -- FAILED.

Done Building Project "C:\allegro_winpkg-master\msvc\allegro\build\INSTALL.vcxp
roj" (default targets) -- FAILED.

Build FAILED.

"C:\allegro_winpkg-master\msvc\allegro\build\INSTALL.vcxproj" (default target)
(1) ->
"C:\allegro_winpkg-master\msvc\allegro\build\ALL_BUILD.vcxproj" (default target
) (2) ->
"C:\allegro_winpkg-master\msvc\allegro\build\allegro.vcxproj" (default target)
(4) ->
(ClCompile target) ->
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2065: 'PA
TH_MAX' : undeclared identifier [C:\allegro_winpkg-master\msvc\allegro\build\al
legro.vcxproj]
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2057: exp
ected constant expression [C:\allegro_winpkg-master\msvc\allegro\build\allegro.
vcxproj]
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2466: can
not allocate an array of constant size 0 [C:\allegro_winpkg-master\msvc\allegro
\build\allegro.vcxproj]
C:\allegro_winpkg-master\msvc\allegro\src\file_stdio.c(315): error C2133: 'fi
lename' : unknown size [C:\allegro_winpkg-master\msvc\allegro\build\allegro.vcx
proj]

0 Warning(s)
4 Error(s)

Time Elapsed 00:00:32.80

C:\allegro_winpkg-master\msvc\allegro\build>echo Failed with error #1.
Failed with error #1.

C:\allegro_winpkg-master\msvc\allegro\build>exit /b 1

C:\allegro_winpkg-master\msvc\allegro\build>

SiegeLord
Member #7,827
October 2006
avatar

That's... distressing. What version of Allegro are you building there?

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Michael Branin
Member #15,864
January 2015

Trying 5.0.11

thats the version we have to use in class as its the last stable version

SiegeLord
Member #7,827
October 2006
avatar

Ah, I see. Looks like that's just broken in 5.0.11, sorry about that.

Add these lines to allegro/src/file_stdio.c, immediately before #include <stdio.h> :

#ifdef ALLEGRO_MSVC
   #include <windows.h>
   #define PATH_MAX MAX_PATH
#endif

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Michael Branin
Member #15,864
January 2015

thats was it. Compiled just fine after that. One last question. Once its all built. Where do I locate the Bin, Lib and Include directories?

Nevermind. ;D I found them

SiegeLord
Member #7,827
October 2006
avatar

Awesome!

I've now updated the scripts to use the XP-compatible toolset and added scripts to generate the 64 bit binaries.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Michael Branin
Member #15,864
January 2015

Hrmm .. ok compiling 5.0.11 did not compile the monolith libs

Bruce Pascoe
Member #15,931
April 2015
avatar

@SiegeLord: Looks like you figured out how to generate the 64-bit binaries without my help. :) Basically you just have to add an additional "x64" platform target to the project alongside the Win32 one and MSVC will then the 64-bit compiler automatically for it. Since you're using default settings, I'm guessing these are linked dynamically to the MSVC runtime and not statically?

MSVC builds are such a pain if you want to use anything other than the default settings (which you usually do) because you're forced to make the edits in the IDE.

Out of curiosity, how far off is 5.1.10? I only ask because apparently the event queue bug I discovered in my other thread (the sound deadlocks) hasn't been fixed/reproduced yet... ;)

SiegeLord
Member #7,827
October 2006
avatar

Out of curiosity, how far off is 5.1.10? I only ask because apparently the event queue bug I discovered in my other thread (the sound deadlocks) hasn't been fixed/reproduced yet... ;)

Soon. I don't know if I'll get a chance to figure that bug out before that, but it'd be nice.

Hrmm .. ok compiling 5.0.11 did not compile the monolith libs

5.0.11 does not have the monolith option (the 5.0.10 binaries were produces using a custom build script).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Michael Branin
Member #15,864
January 2015

well crap. ;D I guess we will be sticking with 5.0.10 until a stable version of 5.1 is released.

SiegeLord
Member #7,827
October 2006
avatar

Aww, come on. The non-monolith builds are not that bad :P.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

 1   2 


Go to: