|
This thread is locked; no one can reply to it. |
1
2
|
Allegro in Dev-C++ |
Skax459
Member #8,290
February 2007
|
I'm trying Dev C++ (5.0) for the first time. I copied the Allgro Lib and Include stuff into the right folders, and tried to make this program: //================================= //Allegro Testing 101 //Samuel Milito, 14 Feb. 2007 //================================= #include "allegro.h" int main(void){ allegro_init(); set_gfx_mode(GFX_SAFE, 640, 480, 0, 0); install_keyboard(); textprintf_ex(screen, font, 1, 469, makecol(0,0,0), makecol(255,255,255), "Version 4.5, 3 February 2007"); while(!key[KEY_Q]){}; allegro_exit(); return EXIT_SUCCESS; }END_OF_MAIN()
Under Project Options->Parameters->Linker I added -lalleg |
ImLeftFooted
Member #3,935
October 2003
|
Use the devpack manager instead to install allegro. |
Skax459
Member #8,290
February 2007
|
Install from what? I have the lib, bin, and include folders...what do I do with them? Should I re-download Allegro? Ok, I installed the package unit. Now it says: I'm going to try un- and reinstalling Dev-C++ |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: [Build Error] [Labyrinth.exe] Error 1 Um, thats only the last error, and means nothing to anyone. Always paste the FIRST errors, or all of them. Quote: I'm going to try un- and reinstalling Dev-C++ Don't be so hasty, just paste the errors, and we'll figure it out. Its mot likely that you have an error in YOUR code, causing gcc, and make to fail. -- |
Lucid Nightmare
Member #5,982
July 2005
|
write a small code irst and then run it. Two Golden Rules of life- Firstly, I'm always right and secondly, if you think otherwise, slap your face and read rule number one again! |
LennyLen
Member #5,313
December 2004
|
Quote: Don't be so hasty, just paste the errors, and we'll figure it out. Nah, just switch to Code::Blocks. But seriously though, the only reason to ever use Dev-C++ was the DevPaks, and Code::Blocks works with those. It also has many more features than Dev-C++ (and it's prettier).
|
Skax459
Member #8,290
February 2007
|
Well, for starters, I think there are 50 some errors that I don't really feel like typing. So I'll try uploading a picture. There is clearly something incredibly wrong with draw.inl. I'm making a Windows GUI program, with -lalleg in the linker box. All the errors are in the picture thats attached Here is the code: //================================ //Allegro Test Program //================================ #include <allegro.h> int main(void){ allegro_init(); set_gfx_mode(GFX_SAFE, 640, 480, 0, 0); install_keyboard(); textout_ex(screen, font, "This doesn't work!", 10, 10, 10, 0); while(!key[KEY_Q]); allegro_exit(); return 0; }END_OF_MAIN()
|
LennyLen
Member #5,313
December 2004
|
Quote: So I'll try uploading a picture. A 2Mb BMP!?!? Have you never heard of GIF?
|
gnolam
Member #2,030
March 2002
|
LennyLen said: Have you never heard of GIF? Let me correct that for you: LennyLen said: Have you never heard of PNG?
-- |
Thomas Fjellstrom
Member #476
June 2000
|
Have you ever heard of copy and paste? or does Dev-CPP not let you save the errors? That'd be one (more) reason to NEVER EVER use it again. edit, Oh thats great, it seems that allegro you have installed is configred for DJGPP? My my... -- |
LennyLen
Member #5,313
December 2004
|
Quote: Let me correct that for you: I'm too lazy to fiddle with the PNG settings to get it to compress as much with GIF for images with few colours. Using default settings, that image came out 50% larger as a PNG than as a GIF.
|
Matthew Leverton
Supreme Loser
January 1999
|
Quote: I'm too lazy to fiddle with the PNG settings Just save it as an 8-bit PNG if you want apples-to-apples comparison. Quote: Well, for starters, I think there are 50 some errors that I don't really feel like typing. So I'll try uploading a picture. There is clearly something incredibly wrong with draw.inl. You are trying to use the DJGPP version. Uninstall Allegro and try again. |
LennyLen
Member #5,313
December 2004
|
Quote: Just save it as an 8-bit PNG if you want apples-to-apples comparison. I use Paint Shop Pro and GIMP. In the former, you need to go through the properties section to change it to 8bit, or change any of the other settings. GIMP doesn't even give you this option (though it does have other settings you can alter). MS Paint is even worse, there's no way to change any settings. When both formats were used with 8bit colour, PNG was smaller by 5%. Not worth the extra effort, IMO. edit: Skax459: If you're going to use Dev-C++, you might should follow Dustin's advice and use the only useful feature Dev-C++ has, the ability to download and install libraries for you. This way, it will install the correct version of Allegro for you. To do this, go to the Tools menu and select Check for Updates/Packages. Select devpaks.org as the server, and it will generate a list of latest packages. Just find Allegro and it will automatically be downloaded and installed for you.
|
Matthew Leverton
Supreme Loser
January 1999
|
You can save 8-bit PNG files in GIMP. GIF is like the IE of image formats to me, but mostly because of the stupid patents that Unisys was trying to enforce. |
LennyLen
Member #5,313
December 2004
|
Quote: You can save 8-bit PNG files in GIMP. GIF is like the IE of image formats to me, but mostly because of the stupid patents that Unisys was trying to enforce. What version? I'm using 2.2, which I know isn't the latest version, and it has no option for 8bit PNG.
|
Matthew Leverton
Supreme Loser
January 1999
|
Just switch to an indexed palette and save as PNG. I'm pretty sure it's supported that for a long time. |
LennyLen
Member #5,313
December 2004
|
Quote: Just switch to an indexed palette and save as PNG. I'm pretty sure it's supported that for a long time. And where does one do that (when I create a new image, I get a choice of either RGB or greyscale, with no options for colour depth)? My help file is corrupted, and I don't actually use GIMP much (as you can probably tell). Actually, the only thing I really ever use it for is for nice font effects. edit: Never mind. I downloaded a new version of the help file, and found out how to do it.
|
Michael Kowalski
Member #8,338
February 2007
|
Hi! I downloaded a package of Allegro from that page: |
William Labbett
Member #4,486
March 2004
|
Likihood is you didn't link with liballeg.a .
|
CursedTyrant
Member #7,080
April 2006
|
Just pass -lalleg to the linker. --------- |
Michael Kowalski
Member #8,338
February 2007
|
Thnx it's workin' now |
X-G
Member #856
December 2000
|
Quote: I use Paint Shop Pro and GIMP. In the former, you need to go through the properties section to change it to 8bit No you don't. Colors -> Decrease color depth. -- |
zenofeller_
Member #8,364
February 2007
|
Quote: the stupid patents that Unisys was trying to enforce. wasn't that thrown out of various courts all through the 90's and then they just gave up ? I, however, am strongly suggesting that you START CAPITALIZING, FUCK IT! (gnolam) |
chaseC
Member #8,368
February 2007
|
responding to the original questions i just want to make it clear that when you download allegro from the package manager you add liballeg.a to the linker, not -lalleg. |
CursedTyrant
Member #7,080
April 2006
|
It should work either way. At least it did for me. AFAIK, liballeg.a == -lalleg --------- |
|
1
2
|