This post is a portion of Part 1 in my on going series about 2D Game Development using the Allegro 5 library. These posts are in course order. You can see all of the posts in this course by clicking the “2D Game Development” button at the top of this site.
- Part 1.0: Intro to Game Development
- Part 1.1: Installing Allegro 5 with Visual Studio 2010
- Part 1.2: Your First Allegro 5 program
In this video, we are looking at testing the installation we did in the previous section. I walk you through a simple application to compile and make sure everything is working.
In Part 2 we will be looking at getting into the world of 2D games.
Full source can be downloaded here.
Hi mate,
After doing all of the above following steps, and double checking that I have installed it correctly I am still getting the error after the end of this tutorial
—
1>—— Build started: Project: Alegro Test, Configuration: Debug Win32 ——
1> main.cpp
1>c:userssoxdocumentsvisual studio 2010projectsalegro testalegro testmain.cpp(1): fatal error C1083: Cannot open include file: ‘allego5allegro.h’: No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any suggestions?
The line should be allegro5allegro.h
You are missing an ‘r’
Hope this helps.
Well, I tried making this under Code::Blocks after following a long and tiring configuration tutorial on their site, but it fails to compile.
It says that I’m giving too many arguments to the “al_show_native_message_box” function.
Also, I observed that you got this neat feature: when you type an include, or a function, some auto-complete pops up showing similar named functions. Is this only a Microsoft Visual Studio specific feature, or can I get it to work on Code::Blocks too? Because certain things appear to pop-up in Code::Blocks, but not allegro functions. It would be a great help for a newbie like me.
I should add that I followed the tutorial for “Static” linking, and I am using Allegro 5.0.4 binaries compiled for MinGW 4.5.2.
Here’s the link of their tutorial: http://wiki.allegro.cc/index.php?title=Windows,_Code::Blocks_10.05_and_Allegro_5
Let me work on that and get back to you.
Try this: http://www.allegro.cc/forums/thread/606041
Well, unfortunately that is one tutorial I’ve followed in the past, but now it’s useless because the 5.0.4 binaries are pre-compiled. There’s no point to struggle with compiling myself the source code.
The one I followed should work just fine but it doesn’t :(. This takes away of my enthusiasm :(.
Mind posting some of your code? What happens if you remove that command? Does the rest of the program function?
It’s exactly the same code like in your “Your First Allegro 5 Program” tutorial, except that I added all these things “#include
#define ALLEGRO_STATICLINK
#include “allegro5/allegro.h”
#include “allegro5/allegro_font.h”
#include “allegro5/allegro_ttf.h”
#include “allegro5/allegro_image.h”
#include “allegro5/allegro_primitives.h”
#include ”
before the int main.
It warns be that I am converting to non-pointer type ‘int’ from null, and then it says that I give the al_show_native_message_box function too many argments.
Actually it seems that I didn’t see well in your video and copied 7 arguments (I had one more “,NULL” in there) instead of 6.
If I try to compile the source file, it goes well.
If I try to hit “Build and Run” an error appears: “undefined reference to ‘PathFindOnPathA@8’. I have no idea what this is :D.
Check this: http://stackoverflow.com/questions/7071769/allegro-compile-error-undefined-reference-to-pathfindonpatha8
Haha, thanks. That solved the problem. Now I can follow your tutorials. Again, it’s late and I will leave that for tomorrow. One question though, for each new Allegro 5 project, do I have to remake the linker configurations?(manually add the libraries each time). Is there an “preset” option or something like that?
Very nice tutorial. Is there any plan for a text format of the tutorial? I like to reading tutorials rather than watching them.
I have no plans at this time to make a text version. I just don’t have the time to do it. If someone else would like to, I would be more than happy to host
Mike, do you know how to apply the same debugging settings to multiple projects? Specifically I want to set the same environment variable in “Configuration Properties -> Debugging” in multiple projects within a solution. Loading/saving Property Sheets from the Property Manager does not seem to affect the Debugging settings, only the General, C/C++, Linker settings etc.
There does not seem to be a way of saving and applying Debugging settings to other projects… Any ideas?
when i run my program it tells me there was build errors
1>—— Build started: Project: allegrotest, Configuration: Debug Win32 ——
1> main.cpp
1>d:usershodgendesktopc++allegrotestallegrotestmain.cpp(21): error C2059: syntax error : ‘)’
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have faith that you can figure this one out. My instincts are telling me something strong about line 21… maybe an extra parenthesis.
for some reason it worked when i copied into another project, there shuold be a black box that pops up for a second right?
Just for convenience, I am following your tut with Allegro 5.0.5, MingW 4.5.2 and Code::Blocks.
I’d like to give a heads-up against keeping all those NULL in the call to al_show_native_message_box agruments…in my trials this prevents ANY text (also the ones we are typing there to inform about initialization problems) to show up, so you get a perfetcly empty dialog box..providing at least Window Title lets the message show up correctly.
I don’t know if thisi s a bug in Allegro call or not but I am about to file a one in Allegro BugTracker.
It could also be nice to pass ALLEGRO_MESSAGEBOX_ERROR as a flags paramenter instead of a NULL pointer, since then you geta “error” kind of dialog instead of the “information” one.
nothing really important but maybe useful to know.
Awesome, thanks for the info
hey, i tryed to run the code in your tutorial but when ever i do it says:
unable to start the program Ç:userslockydocumentsVisual Studio 2010ProjectsAllegro Test 1DebugAllegro Test.exe’.
The system can not find the file specified.
any ideas? i think i may have moved one of the files somewhere and now im not sure what to do.
hey mike i am also getting the same error as Locky here..whenever i compile it says
it cant find the file specified.i double checked the executable location..everything is perfect.but i am getting the same error message..plz help
Where is your project set to place the output? You may want to check that or start a new project and try it.
thanxs mike!!! i rechecked the file location and there was an error..and did two different things…instead of copying include and lib folder into msvc 2010’s respective include and lib folders,,,i copied the address of allegro’s include and lib in my project properties tab under :CC++->General->Additional include directories and Linker->General->Additional Lirary directories….while Linker->Input->Additional Dependencies is the same i.e.allegro-5.0.6-monolith-md-debug.lib…(i using 5.0.6 version).
i wanna know what i did is just an alternate path or the same thing.?thanxs again for ur great work sir..
Every time I try to compile I get:
“Error: allegro5allegro.h: No such file or directory”
I followed the exact steps you did for installation. I’ve tried so many more tutorials, but keep getting the same error. Any ideas?
Very nice tutorials by the way. 🙂
To all people who have difficulty installing Allegro:
I found a thread on a step-by-step to installing Allegro and it is now working in my computer. The link is: http://www.allegro.cc/forums/print_thread/606041
Credits go to DocHoliday.
How come you write void inside of these parenthese? int main(void)
Ive already looked it up and it says something about returning some type of value to the os can you clarify? thanks great tutorials btw!
got a problem. i have a code like that:
#include
#include
#include
int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;
if(!al_init()) {
fprintf(stderr, “failed to initialize allegro!n”);
return -1;
}
display = al_create_display(640, 480);
if(!display) {
fprintf(stderr, “failed to create display!n”);
return -1;
}
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_rest(10.0);
al_destroy_display(display);
return 0;
}
and then i remove first “if”, like that:
#include
#include
#include
int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;
display = al_create_display(640, 480);
if(!display) {
fprintf(stderr, “failed to create display!n”);
return -1;
}
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_rest(10.0);
al_destroy_display(display);
return 0;
}
and now i get an error(compiler says everything’s fine) after starting program, it says:
unhandled exception at 0x570e590b in allegro507template.exe: 0xC0000005: Access violation reading location 0x00000000.
does initialization check makes such a big problem?
also, here is Debug Output, maybe it will help:
‘allegro507template.exe’: Loaded ‘C:Users????????DocumentsVisual Studio 2010Projectsallegro507templateDebugallegro507template.exe’, Symbols loaded.
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32ntdll.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32kernel32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32KernelBase.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:allegrobinallegro-5.0.7-monolith-md-debug.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32psapi.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32ole32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32msvcrt.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32gdi32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32user32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32lpk.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32usp10.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32rpcrt4.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32shlwapi.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32winmm.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32shell32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:Windowswinsxsx86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7600.16385_none_72fc7cbf861225caGdiPlus.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32comdlg32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:Windowswinsxsx86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16385_none_ebf82fc36c758ad5comctl32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32advapi32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32sechost.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32opengl32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32glu32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32ddraw.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32dciman32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32setupapi.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32cfgmgr32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32oleaut32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32devobj.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32dwmapi.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32msvcr100d.dll’, Symbols loaded.
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32imm32.dll’, Cannot find or open the PDB file
‘allegro507template.exe’: Loaded ‘C:WindowsSystem32msctf.dll’, Cannot find or open the PDB file
First-chance exception at 0x570e590b in allegro507template.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x570e590b in allegro507template.exe: 0xC0000005: Access violation reading location 0x00000000.
The program ‘[4036] allegro507template.exe: Native’ has exited with code -1073741819 (0xc0000005).
The initial IF statement is not just checking the init, it is actually running the init. Without it, Allegro is not being initialized
Hi,
I did what you showed us, but I get this:
=========================================================================
1>—— Build started: Project: allegro test, Configuration: Debug Win32 ——
1> main.cpp
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): error C2059: syntax error : ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): error C2091: function returns function
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): warning C4183: ‘int64_t’: missing return type; assumed to be a member function returning ‘int’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(28): error C2061: syntax error : identifier ‘int64_t’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(55): error C2143: syntax error : missing ‘;’ before ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(56): error C2061: syntax error : identifier ‘int64_t’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(61): error C2143: syntax error : missing ‘;’ before ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(61): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(61): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(14): error C2146: syntax error : missing ‘;’ before identifier ‘__pad1__’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(14): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(14): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(15): error C2146: syntax error : missing ‘;’ before identifier ‘__pad2__’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(15): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(15): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5events.h(151): error C2146: syntax error : missing ‘;’ before identifier ‘count’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5events.h(151): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5events.h(151): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(55): error C2143: syntax error : missing ‘;’ before ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(56): error C2061: syntax error : identifier ‘int64_t’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(57): error C2061: syntax error : identifier ‘int64_t’
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
======================================================================
Can you please tell what can be done to fix it?
Can you email me the code?
Guys I have 2 minor problems. The program is ok and runs but window is white, and if I try to run the program from the allegrotest.exe file it gives me this error: allegro-5.0.7-monolith-md-debug.dll file missing from computer.
The second problem is because you have to have the .dll file in the folder with the .exe to run it.
Your screen could be white for any number of reasons. More than likely something is a little off with your code. Be sure to check it line by line and look for the problem
I’m using Dev C++ with Allegro 5.0.6, and I’m getting several linker errors.
C:UsersRedactedDocumentsC++Allegro ProjectsAllegroTest.cpp In function `int main()’:
9 C:UsersRedactedDocumentsC++Allegro ProjectsAllegroTest.cpp [Warning] passing NULL used for non-pointer converting 6 of `int al_show_native_message_box(ALLEGRO_DISPLAY*, const char*, const char*, const char*, const char*, int)’
i:gwlibcrt2.o(.text+0x8) In function `_mingw_CRTStartup’:
[Linker error] undefined reference to `__dyn_tls_init_callback’
[Linker error] undefined reference to `__cpu_features_init’
[Linker error] undefined reference to `al_install_system’
[Linker error] undefined reference to `al_show_native_message_box’
9 i:gwlibcrt2.o(.text+0x8) ld returned 1 exit status
My code (same as yours, except with straight file names instead of directories since I set up the compiler to automatically look through all allegro5 include directories):
#include
#include
int main()
{
ALLEGRO_DISPLAY *display = NULL;
if (!al_init())
{
al_show_native_message_box(NULL,NULL,NULL,”Failed to initialize Allegro graphics engine”,NULL,NULL);
return -1;
}
}
Also… what’s with the weird avatars?
Also, if you’re going to tell me that I shouldn’t be using Dev C++, then don’t bother. I’m using it because Microsoft Visual C++ is a pain for me to navigate.
You can use whatever environment you like. Are you 100% sure you set the linker up correctly?
It’s hard to tell, the way Dev C++ handles libraries and how Allegro 5 is divided into modules instead of just having one library. I added every single library to the linker settings, but I still get these errors.
Keep getting this error, im using this with 2012, all works fine except it says this
1>main.obj : error LNK2019: unresolved external symbol __imp__al_create_display referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__al_show_native_message_box referenced in function _main
Have you not initialized allegro before calling the create display? Have you included the headers?
i copied the code into microsoft visual studios 2010, went to properties of config properties, linker, input and went on edit of additional dependencies and typed in allegro-5.0.1-monolith-md-debug.lib i applied the settings and pressed ok, but when i go to compile it i get an error
1>—— Build started: Project: allegrotests, Configuration: Debug Win32 ——
1>Build started 17/12/2012 4:33:41 PM.
1>InitializeBuildStatus:
1> Touching “Debugallegrotests.unsuccessfulbuild”.
1>ClCompile:
1> main.cpp
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5platformastdint.h(28): fatal error C1083: Cannot open include file: ‘inttypes.h’: No such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.53
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can you try rebuilding the project? It is a strange error. Are you missing inttypes.h from your system?
i don’t know what it means by inttypes.h, where it would be or anything like that, but i will try again when i get the chance!
I have tried it again, but i got the same error : any suggestions??
You do realise that the “first program” as it is called has flawed logic! The program checks to see if Allegro has initialised and if it isn’t, then goes onto calling an Allegro function. How can it do that if Allegro is not initialised? Secondly, if the display is not initialised, it then tries to display an error message. How can it display a message if the display is not there?
Am I missing something?
I believe originally it was intended for the native dialog box to work even in Allegro did not initialize properly. Once I realized it was changed I had already made the video. Cheers.
Apologies. I should read the manual more closely. It says “al_show_native_message_box may be called without Allegro being installed. This is useful to report an error to initialise Allegro itself.”
I assume this applies to the display not being initialised as well.
Please forgive.
Hi! Thanks very much for the great tutorials
It’s very late so please forgive me if I am just not looking in the right spots, but do you have any information regarding the different type of linking options for allegro? Specifically the differences between dynamic and static linking and in which situations the different types would be appropriate?
I understand that the dynamic process would require the developer to distribute the allegro DLL files with the built executable, and that the static linker would not. Whereas the static linking would include the DLL files in the built exe..
Would this make the file platform dependent, or dependent between 32/64 bit depending on which version is statically linked?
Thank you for any clarification you can provide!
Instead of dragging my files over to the system folder, I followed these instructions:
http://wiki.allegro.cc/index.php?title=Windows,_Visual_Studio_2010_and_Allegro_5#Setup_Project_For_Allegro_5
However, I have this error:
“The program can’t start because allegro-5.0.8-monolith-md-debug.dll is missing from your computer. Try reinstalling the program to fix this problem.”
The build goes fine but this error comes up when debugging.
I have tried putting the allegro-5.0.8-monolith-md-debug.dll in just about every folder and I still get this error.
Any idea what my problem is? Or would this all be cleared up by moving the files to the system folder?
Mike,
I am trying to get this program to work, however the only allegro I could get my hands on was the 5.0.6 precompiled version. I did the same steps you did in the video, but in the additional dependencies field I put this in instead allegro-5.0.6-monolith-md-debug.lib. After trying to get the program to work after this I got the following output.
1>—— Build started: Project: Allegro Test, Configuration: Debug Win32 ——
1> Main.cpp
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): error C2059: syntax error : ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): error C2091: function returns function
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(27): warning C4183: ‘int64_t’: missing return type; assumed to be a member function returning ‘int’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(28): error C2061: syntax error : identifier ‘int64_t’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(55): error C2143: syntax error : missing ‘;’ before ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(56): error C2061: syntax error : identifier ‘int64_t’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(61): error C2143: syntax error : missing ‘;’ before ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(61): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5file.h(61): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(14): error C2146: syntax error : missing ‘;’ before identifier ‘__pad1__’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(14): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(14): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(15): error C2146: syntax error : missing ‘;’ before identifier ‘__pad2__’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(15): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5altime.h(15): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5events.h(151): error C2146: syntax error : missing ‘;’ before identifier ‘count’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5events.h(151): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5events.h(151): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(55): error C2143: syntax error : missing ‘;’ before ‘__cdecl’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(55): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(56): error C2061: syntax error : identifier ‘int64_t’
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5timer.h(57): error C2061: syntax error : identifier ‘int64_t’
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If you could point me in the right direction as to what I need to do to get this compiling, I’d be very grateful.
Yours Truly,
Gordon
I looks like you don’t have your files added correctly. You could always email me your project to look at.
i am also getting the same error as gordon! please reply!
I looks like you don’t have your files added correctly. You could always email me your project to look at.
Hi mike! fantastic video although I am getting an error that says that MSVCR100D.dll is missing. I am using Microsoft Visual Studio Express 2012.. if that makes a difference. I attempted to download the 2010 version but it bumped me up to 2012. Thank you for your help!
ahhhh wish i could delete this… found a solution….
I thought I installed everything correctly but this error keep popping up:
1>—— Build started: Project: Allegro_Test, Configuration: Debug Win32 ——
1> main.cpp
1>c:program files (x86)microsoft visual studio 10.0vcincludeallegro5platformastdint.h(28): fatal error C1083: Cannot open include file: ‘inttypes.h’: No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The only time I’ve seen that error is when something is not installed correctly. I’d recheck.
Hi Mike! I just want to say thank you. I am a computer engineering student who has been struggling to start doing what I really want to do in my life, which is creating games, and your website is helping me a lot!
Thank you and keep the good work!
Hey mike, you just made things simple for me. I owe you this one. I have just started with your tutorial and its going so smooth. In case you dont have time to make a text version of this, I would like to do it for you as soon as I complete this tutorial. As a token of thanks to your work for newbie’s like us. Thanx again ,You’re the man!!
Hey mike, your article is greate. But unfortunately I can not download the source code from above link. Is the soure availalbe now. Thanks!
Can someone please show me how to use Allegro library with Netbeans compiler (MinGW). I copy 3 files in pre-built MinGW binary folder to C:MinGW then compiling the above file in Netbean. But it keeps showing errors. I am stuck right there. I don’t know what to do next. Any help would be appreciated.
When I run my code, it fails and says this. Please help.
“LINK : fatal error LNK1561: entry point must be defined”
Followed tutorial exactly except had to install a more recent version of allegro found here http://static.allegro.cc/file/library/allegro/5.0.6/allegro-5.0.6-msvc-9.0.zip , the rest i followed exactly and yet here is a screenshot of all the error messages i’m getting, any help? http://gyazo.com/a122a345869927ab59aab563ab5f5eb0
hi,
I get a error from my properties linker. Somehow it cannot open my allegro file.
This is the error message
1>—— Build started: Project: Test Game, Configuration: Debug Win32 ——
1> main.cpp
1>LINK : fatal error LNK1104: cannot open file ‘allegro-5.0.1-monolith-md-debug.lib’
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
could somebody help me with this?
Thanks.