Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro 5.2.0 released!

This thread is locked; no one can reply to it. rss feed Print
 1   2   3   4 
Allegro 5.2.0 released!
SiegeLord
Member #7,827
October 2006
avatar

Incidentally, there are tons of wiki articles that still refer to Allegro 5.0 and 5.1... it'd be convenient if somebody spent a minute of their time updating an article... just search for 5.0 and 5.1!

"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

When will 5.2 be available for Ubuntu? I don't expect official packages anytime soon, but the PPA hasn't been updated either.

SiegeLord
Member #7,827
October 2006
avatar

Sometime this weekend most likely.

EDIT: I hit a snag in that I am not allowed to create new PPAs for the Allegro organization on launchpad (I need a 5.2 PPA). I've contacted the owner, so it might take a little bit longer still.

EDIT2: Now it's updated.

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Building latest master branch for 5.2 fails on the example ex_d3d.exe. It's not linking with libd3dx9.a :

This is on MinGW 4.8.1 on Win10.

C:/mingw/LIBS/A5GIT/allegro5/examples/ex_d3d.cpp:59: undefined reference to `D3DXMatrixPerspectiveFovLH@20'
C:/mingw/LIBS/A5GIT/allegro5/examples/ex_d3d.cpp:95: undefined reference to `D3DXMatrixTranslation@16'
C:/mingw/LIBS/A5GIT/allegro5/examples/ex_d3d.cpp:98: undefined reference to `D3DXMatrixRotationY@8'
collect2.exe: error: ld returned 1 exit status
examples\CMakeFiles\ex_d3d.dir\build.make:117: recipe for target 'examples/ex_d3d.exe' failed

I believe the problem is in allegro5/examples/Helper.cmake with the 'example' function's parsing of the input arguments.

Here is Helper.cmake - see the highlighted line

#SelectExpand
1# Conditionally build an example program. If any of its arguments is the exact 2# string "x", do nothing. Otherwise strip off the "x" prefixes on arguments 3# and link to that target. 4function(example name) 5 # Use cmake_parse_arguments first. 6 set(flags CONSOLE) 7 set(single_args) # none 8 set(accum_args DATA) 9 cmake_parse_arguments(MYOPTS "${flags}" "${single_args}" "${accum_args}" 10 ${ARGN}) 11 12 # Parse what remains of the argument list manually. 13 set(sources) 14 set(libs) 15 set(android_stl) 16 foreach(arg ${MYOPTS_UNPARSED_ARGUMENTS}) 17 if(arg STREQUAL "x") 18 message(STATUS "Not building ${name}") 19 return() 20 endif() 21 if(arg MATCHES "[.]c$") 22 list(APPEND sources ${arg}) 23 elseif(arg MATCHES "[.]cpp$") 24 list(APPEND sources ${arg}) 25 set(android_stl stlport_shared) 26 else()
27 string(REGEX REPLACE "^x" "" arg ${arg})
28 list(APPEND libs ${arg}) 29 endif() 30 endforeach() 31 32 # If no sources are listed assume a single C source file. 33 if(NOT sources) 34 set(sources "${name}.c") 35 endif() 36 37 # Prepend the base libraries. 38 if(ANDROID) 39 set(libs ${ALLEGRO_LINK_WITH} ${libs}) 40 else() 41 set(libs ${ALLEGRO_LINK_WITH} ${ALLEGRO_MAIN_LINK_WITH} ${libs}) 42 endif() 43 44 # Popup error messages. 45 if(WANT_POPUP_EXAMPLES AND SUPPORT_NATIVE_DIALOG) 46 list(APPEND libs ${NATIVE_DIALOG_LINK_WITH}) 47 endif() 48 49 # Monolith contains all other libraries which were enabled. 50 if(WANT_MONOLITH) 51 set(libs ${ALLEGRO_MONOLITH_LINK_WITH}) 52 endif() 53 54 list(REMOVE_DUPLICATES libs) 55 56 if(WIN32) 57 if(MYOPTS_CONSOLE) 58 # We need stdout and stderr available from cmd.exe, 59 # so we must not use WIN32 here. 60 set(EXECUTABLE_TYPE) 61 else() 62 set(EXECUTABLE_TYPE "WIN32") 63 endif() 64 endif(WIN32) 65 66 if(IPHONE) 67 set(EXECUTABLE_TYPE MACOSX_BUNDLE) 68 endif(IPHONE) 69 70 if(ANDROID) 71 if(MYOPTS_CONSOLE) 72 message(STATUS "Not building ${name} - console program") 73 return() 74 endif() 75 add_copy_commands( 76 "${CMAKE_CURRENT_SOURCE_DIR}/data" 77 "${CMAKE_CURRENT_BINARY_DIR}/${name}.project/assets/data" 78 assets 79 "${MYOPTS_DATA}" 80 ) 81 add_android_app("${name}" "${sources};${assets}" "${libs}" "${stl}") 82 elseif(IPHONE) 83 add_our_executable("${name}" SRCS "${sources};${CMAKE_CURRENT_SOURCE_DIR}/data" 84 LIBS "${libs}") 85 set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/data" PROPERTIES 86 MACOSX_PACKAGE_LOCATION "Resources") 87 else() 88 add_our_executable("${name}" SRCS "${sources}" LIBS "${libs}") 89 endif() 90endfunction(example) 91 92#-----------------------------------------------------------------------------# 93# vim: set ts=8 sts=4 sw=4 et:

I believe that line replaces all instances of any character other than 'x' with null (but I'm probably totally wrong as I know very little about regular expressions). I think what it means is match any word beginning with an 'x' and replace that word with an empty string. So I don't actually know why it's not working.

In allegro5/examples/CMakeLists.txt there are the following lines to create the ex_d3d example :

if(WANT_D3D AND D3DX9_FOUND)
    example(ex_d3d ex_d3d.cpp ${D3DX9_LIBRARY})
endif(WANT_D3D AND D3DX9_FOUND)

${D3DX9_LIBRARY}) is libd3dx9.a

I don't think it is parsing it properly, and so libd3dx9.a is not getting linked, causing the undefined references.

What do you think?

SiegeLord
Member #7,827
October 2006
avatar

Try running make ex_d3d VERBOSE=1 and see what link command it outputs. The only thing that changed recently is that the core no longer links D3DX9. For me it gives:

/F/msys64/mingw64/bin/g++.exe   -W -Wall -Wpointer-arith -g -DDEBUGMODE=1 -DD3D_DEBUG_INFO  -mwindows -Wl,--whole-archive CMakeFiles/ex_d3d.dir/objects.a -Wl,--no-whole-archive  -o ex_d3d.exe
-Wl,--major-image-version,0,--minor-image-version,0  ../lib/liballegro_main-debug.dll.a /F/msys64/mingw64/x86_64-w64-mingw32/Lib/libd3dx9.a ../lib/liballegro_dialog-debug.dll.a ../lib/liballegro-debug.dll.a
-lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -lwinmm -lpsapi -lshlwapi /F/msys64/mingw64/x86_64-w64-mingw32/Lib/libdinput8.a -lglu32 -lopengl32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

mingw32-make ex_d3d VERBOSE=1

c:\mingw\bin\g++.exe   -W -Wall -Wpointer-arith -g -DDEBUGMODE=1 -DD3D_DEBUG_INFO  -mwindows -Wl,--whole-archive CMakeFiles\ex_d3d.dir/objects.a -Wl,--no-whole-archive  -o ex_d3d.exe -Wl,--out-implib,libex_d3d.
dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\ex_d3d.dir\linklibs.rsp

Well for me it's not linking libd3dx9.a .

Why is it making an import library? "-Wl,--out-implib,libex_d3d.dll.a"?

Edit
@SiegeLord - Are you using the MSYS Makefile generator or the MinGW Makefile generator? I don't know if that makes a difference though.

I'm not sure what that last parameter is but I think it's inlining the contents of that file ( @CMakeFiles\ex_d3d.dir\linklibs.rsp ).

Here's what that file contains :

 ../lib/liballegro_monolith-debug.dll.a -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -lwinmm -lpsapi -lshlwapi -Wl,-Bstatic -ldinput8 -Wl,-Bdynamic -lglu32 -lopengl32 -Wl,-Bstatic -lgdiplus -Wl,-Bdynamic -luuid -Wl,-Bstatic -ldsound -Wl,-Bdynamic -lOpenAL32 -Wl,-Bstatic -lFLAC -Wl,-Bdynamic -logg -lwsock32 -Wl,-Bstatic -ldumb -Wl,-Bdynamic -lvorbisfile -lvorbis -Wl,-Bstatic -lfreetype -Wl,-Bdynamic -lzlib -lphysfs -ltheoradec -logg -lwsock32 -Wl,-Bstatic -ldumb -Wl,-Bdynamic -lvorbisfile -lvorbis -Wl,-Bstatic -lfreetype -Wl,-Bdynamic -lzlib -lphysfs -ltheoradec -lpng16.dll -lzlib.dll -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

-ld3dx9 is not there.

SiegeLord
Member #7,827
October 2006
avatar

Yeah, I am using MSYS makefiles... odd.

Could you try compiling 5.1.13 and seeing if this command is different?

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

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I deleted ex_d3d.exe from my 5.1.13 build and reran "mingw32-make ex_d3d VERBOSE=1" and here's what it said when linking the file.

c:\mingw\bin\g++.exe   -W -Wall -Wpointer-arith -g -DDEBUGMODE=1 -DD3D_DEBUG_INFO  -mwindows -Wl,--whole-archive CMakeFiles\ex_d3d.dir/objects.a -Wl,--no-whole-archive  -o ex_d3d.exe -Wl,--out-implib,libex_d3d.
dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\ex_d3d.dir\linklibs.rsp

And here's what build\examples\CMakeFiles\ex_d3d.dir\linklibs.rsp contains : (note it has -ld3dx9 in it).

 ../lib/liballegro_monolith-debug.dll.a -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -lwinmm -lpsapi -lshlwapi -Wl,-Bstatic -ldinput8 -Wl,-Bdynamic -lglu32 -lopengl32 -Wl,-Bstatic -ld3dx9 -lgdiplus -Wl,-Bdynamic -luuid -Wl,-Bstatic -ldsound -lFLAC -Wl,-Bdynamic -logg -lwsock32 -Wl,-Bstatic -ldumb -Wl,-Bdynamic -lvorbisfile -lvorbis -Wl,-Bstatic -lfreetype -Wl,-Bdynamic C:/mingw/lib/libzlib.dll.a -Wl,-Bstatic -lphysfs -Wl,-Bdynamic -ltheoradec -logg -lwsock32 -Wl,-Bstatic -ldumb -Wl,-Bdynamic -lvorbisfile -lvorbis -Wl,-Bstatic -lfreetype -Wl,-Bdynamic C:/mingw/lib/libzlib.dll.a -Wl,-Bstatic -lphysfs -Wl,-Bdynamic -ltheoradec -static -lpng16 -lzlibstatic -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

I should note I am using CMake 3.3.2.

Edit
Bump to give time for reply.

Also, I will have some binaries ready today or tomorrow for MinGW 4.8.1. I may also put together a newer package of MinGW and binaries for it too, but that may take a little while.

Neil Roy
Member #2,229
April 2002
avatar

I may also put together a newer package of MinGW and binaries for it too, but that may take a little while.

That would be awesome. :)

---
“I love you too.” - last words of Wanda Roy

ks
Member #1,086
March 2001

Which version of Visual Studio, or does it not matter? I have always used MinGW with Allegro but decided to give VS2015 Community Edition a try today. I did the following with no real luck,

1. created a console application
2. installed the nuget package
3. copied ex_keyboard_events.c into the project folder and included in the solution
4. copied common.c into the project folder and included in the solution
5. turned off pre-compiled headers

The above ends with "exit identifier not found". I don't think that's the issue rather I'm missing some fundamental understanding of how to configure.

---

I take it the nuget package installer configures Allegro 5 for that project. Is the recommended approach to re-install the libraries for each project?

SiegeLord
Member #7,827
October 2006
avatar

Not sure what causes this issue for you, but you could just try adding #include <stdlib.h> on top of your ex_mouse_events.c file.

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

bamccaig
Member #7,536
July 2006
avatar

FYI, the Fedora package maintainer has already updated the packages so I think 5.2.0 should be available in Fedora already (and if not then soon).

Bruce Pascoe
Member #15,931
April 2015
avatar

Good to know, let's hope the Debian maintainer does the same soon so it can make it into Ubuntu without the need to add the PPA. :)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy
Member #2,229
April 2002
avatar

Edit - here ya go. Built with MinGW 4.8.1. Dependencies included, examples and demos too.

Woohoo, as always, your efforts are much appreciated Edgar! Thanks. :D

Edit: When I compiled my game in static debug mode, it compiled fine, but I notice in my console that it is reporting this as Allegro v5.1.13? I done a totally clean build using your download. But I got no errors when I compiled it and it obviously ran, but that version is off.

Secondly, when I done a clean, static release compile, I got the following errors...

||=== Clean: Release32 in Deluxe Pacman 2 (compiler: GNU GCC Compiler) ===|
||=== Build: Release32 in Deluxe Pacman 2 (compiler: GNU GCC Compiler) ===|
C:\MinGW\lib\liballegro_monolith-static.a(dsound.cpp.obj):dsound.cpp|| undefined reference to `DirectSoundCreate8@12'|
C:\MinGW\lib\liballegro_monolith-static.a(dsound.cpp.obj):dsound.cpp|| undefined reference to `DirectSoundCaptureCreate8@12'|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 7 second(s)) ===|

All compiled using your MinGW5.8.1 distro you provided and the latest Allegro you posted about just now.

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy
Member #2,229
April 2002
avatar

It depends on DirectSound for some reason. -ldsound will fix that error.

I tried that with the static release build and it compiles, but when I run the game, it gives a seg fault and doesn't run at all. Debug works fine still.

---
“I love you too.” - last words of Wanda Roy

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

If debug works and release doesn't you might have an uninitialized variable somewhere. Try using printf statements to see where it is crashing. I don't know how else to debug release build crashes. I'm not sure why it is crashing. I am currently using static release builds in my TINS entry and it is not crashing.

CodeDmitry
Member #16,341
May 2016

V_V I have struggling so hard for the last 5 years to get any version of Allegro going and still can't get it to build nor find existing binaries/up to date tutorials.

This is my most recent attempt(lossy, lossless is attached to this post)
http://imgur.com/zP9YP7d

Please help V_V I really want to read my Game Programming All in One 2nd edition without having to translate everything to Java or SDL or GDI.

Much sadness.

MiquelFire
Member #3,110
January 2003
avatar

Upgrade to MSVC 2013 or 2015 and use NuGet!

I need to upgrade to 2015 at some point myself.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

CodeDmitry
Member #16,341
May 2016

I can't upgrade beyond 2012 unless I reinstall windows to get the service pack.

I need it to work on MinGW or VS2012.

bamccaig
Member #7,536
July 2006
avatar

You should probably upgrade your system for security purposes. I recommend switching to a free GNU/Linux distro if money (and morality) are an issue (and even if they aren't). Ubuntu is made to be very friendly and a Windows user won't have any problem accepting proprietary license agreements. Software development also tends to be much easier in Linux for various reasons.

Alternatively, you could reinstall Windows onto a 50% partition and then install a Linux distro side-by-side... Then you still have Windows for everyday use, but can dual-boot into Linux for Allegro development...

Alternatively, there are people here with the skills and experience to create a build for you... I'm not one of them. Gathering and sorting out the dependencies in Windows is simply too much trouble. But if it's important enough for you there may be people willing to create the binaries for you for payment.

5 years is a ridiculous amount of time to wait anyway. Don't wait any longer. Either solve your Allegro woes or move on. There are many other game development platforms and several other books...

MiquelFire
Member #3,110
January 2003
avatar

What server pack requires you to reinstall?

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

bamccaig
Member #7,536
July 2006
avatar

CodeDmitry
Member #16,341
May 2016

@bamccaig

The whole reason I'm interested in Allegro is because of its' portability. I am certain there is a way to get it to work on this system, but it is not as streamlined as SDL or even SFML(which I struggled with quite a bit) is, which is one of the biggest issues limiting Allegro's growth.

I have both Debian and Windows 10 on VirtualBox that run well enough to code on, but I am not going to be ready to transition from this system for a bit(I have plans to move to Debian in some future and use Windows 10 in VirtualBox but I'm not quite sure if I can move a Virtual machine from Windows to Linux).

Besides, my system is not relevant here. Isn't Allegro suppose to be able to build with MinGW and Visual Studio 2012? I am fine with using MinGW for it, but I am facing similar issues where it goes through the build process, complains that it can't find many libc features, says it's complete, and there are no output libs.

PS: I am running Windows 7 without any service packs at the moment.

 1   2   3   4 


Go to: