![]() |
|
jpeg alleg library issue |
A J
Member #3,025
December 2002
![]() |
X-G your smarter than me, im stupid, please explain to me what i should have done. i have zero clue about how to make zconf.h work for msvc. ___________________________ |
X-G
Member #856
December 2000
![]() |
Read my last edit. The complete packages do contain zlib.h and all the other things you need. Personally I'm a bit offended by you blaming all the problems you are having on the packages being faulty when there is absolutely nothing wrong with them; in fact, the outright lie that the zlib complete package does not contain zlib.h is appalling. -- |
Peter Wang
Member #23
April 2000
|
I didn't realise gnuwin32 binaries were usable with MSVC. Now I'm trying to make a version of this howto for MSVC. Here's what I've got so far, but it's completely untested. I don't know what to do about step 3 either. UPDATED: Quote: 1. Download the precompiled zlib and libpng packages from http://gnuwin32.sourceforge.net For the extremely lazy, just left-click these: It looks like you DON'T need this: 2. 2b. Open up the zconf.h in your MSVC include directory. Search for the line "#if 1 /* HAVE_UNISTD_H ... */" and replace it with "#if 0 /* HAVE_UNISTD_H ... */". zlib and libpng are now installed. 3. 4. 5.
|
A J
Member #3,025
December 2002
![]() |
Quote: the outright lie that the zlib complete package does not contain zlib.h is appalling
shall i provide you the link? that you suggested ? peter, i have just found a better source of MSVC compatible zlib/png .lib files.. i shall inform you of my findings in about an hour, when i get the loadpng files compiled.. its saying these:
___________________________ |
Peter Wang
Member #23
April 2000
|
Compile as C. I'll see about making it C++ compatible some other time (or send a patch).
|
Oscar Giner
Member #2,207
April 2002
![]() |
What's that libgw32c library you're talking about? I've been using loadpng for some time and I've never needed that Quote: Googling for 'gnuwin32 libpng' Why anyone who is looking for a msvc package would google for that? The oficial distribution comes with a msvc project, so that one should work. Now download zlib from the official page. Uncompress zlib inside a folder named zlib at the same level where you put libpng (so if you have libpng at c:\libs\lpng128, you should put zlib at c:\libs\zlib). Open the loadpng workspace (or solution if using 7.x) and compile (you'll notice this workspace also has a zlib project so you can compile it easily, that's why it's important where you decompressed zlib). [edit] -- |
X-G
Member #856
December 2000
![]() |
Quote: shall i provide you the link? that you suggested ? Please do. In the meantime: The page I linked you to is this. On that page, under the header "Requirements", is a link named "zlib" that leads here. On that page is a package called "Complete package, except sources". That's the one you claimed to have downloaded: Quote: i tried downloading what is called the "Complete package" off the link you provided, and its missing a zlib.h This file installs, among other files:
</li> To claim anything else is an utter lie. I don't know, maybe you failed to realize that the things listed under "Requirements" are actually required for it to work? Maybe you just got the run-time dependency file... still, that's hardly a problem with the packaging. It's all there, black on white. Quote: Why anyone who is looking for a msvc package would google for that? Typically because they know that Gnuwin32 is a collection of GNU libraries and tools ported to Windows. But even if one does not know that, the very same page is the top result of a search for libpng for windows — and you must agree it doesn't get more intuitive than that! -- |
Adriano Guido
Member #4,627
May 2004
|
okay, i got it. how do i load an image and then blit it? jpegalleg seemed to have a fairly simple method of doing so, i hope loadpng (or whatever it's called) is the same way. |
Evert
Member #794
November 2000
![]() |
jpgalleg and loadpng do basically the same thing: once you have initialized them, you can use Allegro's load_bitmap() function to load PNG and JPEG images into BITMAP structs. That's all they do. |
Adriano Guido
Member #4,627
May 2004
|
oh okay, perfect. thanks edit
main.obj - 1 error(s), 0 warning(s) not so perfect. |
Peter Wang
Member #23
April 2000
|
Search this thread for libgw32c.
|
Adriano Guido
Member #4,627
May 2004
|
i already installed that. (using msvc, incase i need compiler specific tips) |
Peter Wang
Member #23
April 2000
|
DON'T DO THIS: edit: or try just commenting out the unistd.h line in zconf.h
|
Adriano Guido
Member #4,627
May 2004
|
main.obj - 1 error(s), 0 warning(s) i also tried copying winx files to include, that didn't work. |
Peter Wang
Member #23
April 2000
|
Grr. Try changing the "#if 1 /* HAVE_UNISTD_H ... */" line in zconf.h to "#if 0". edit: crap, I hope I didn't mess up your MSVC installation when I asked you to move the include/glibc files into include. You probably will have to restore the MSVC versions of any files you overwrite.
|
Adriano Guido
Member #4,627
May 2004
|
same error |
Peter Wang
Member #23
April 2000
|
See edit. Sorry about that.
|
Adriano Guido
Member #4,627
May 2004
|
ah.. yes you did... meh, i still have my source code, i'll just do a quick reinstall. but when i get back i expect an aswer that works or else! haha jk |
Peter Wang
Member #23
April 2000
|
Right, I finally bothered to boot into Windows. I have a installation of the free version of MSVC that Microsoft provided, and I think I've got it to work. See my updated instructions above.
|
Adriano Guido
Member #4,627
May 2004
|
okay, once reinstall is done. ill post an update. if no one posts after me all i can do is an update to this post. (you all probably know that, but i don't post here alot so that was new to me) |
Thomas Fjellstrom
Member #476
June 2000
![]() |
bump -- |
Adriano Guido
Member #4,627
May 2004
|
it worked! i just don't know how to use it! |
Peter Wang
Member #23
April 2000
|
Thanks for testing. I think all the information you need is in loadpng.h. Failing that, see the source.
|
A J
Member #3,025
December 2002
![]() |
X-G, seems Adriano Guido has run into the exact same problem i did. Peter, X-G, thank you for your help. im glad its getting resolved. Peter, apolgies for not getting back to you sooner, i just moved by 40gig to a new box, new HD's, new OS, so have had 2 days downtime ___________________________ |
Oscar Giner
Member #2,207
April 2002
![]() |
Quote:
X-G, seems Adriano Guido has run into the exact same problem i did. But from where did you download zlib? The official zlib zip doesn't need unistd.h. Really, I think you guys are doing it the hard path. The official distributions (of both zlib and libong) work perfectly with MSVC, without requiring any extra lib... -- |
|
|