| 08-13-2009, 07:47 AM | #1 |
What about usage sfmpq.dll with mingw? i tried to compile test vs studio project (simple mpq-archive extracter), but i've got linking error - undefined reference to some functions. Does any1 tried to experiment with g++ compiler? |
| 08-13-2009, 02:15 PM | #2 |
I don't know, all I remember is that when you want to use a DLL in g++ on windows, you need a .a /.lib file for the linking. Did SFMPQ.dll 's distribution include it? ultimately, you can try to get the source code of sfmpq.dll and do something with it... |
| 08-13-2009, 02:22 PM | #3 |
No, gcc do not requires .lib file, and .a is a static library as i remember. However, i've got some results with using LoadLibrary (i mean it seems working perfect:)), but i now it seems that i want a crossplatform decision... expecially for mac. I've found sources, but i've got problems compiling them on mingw... |
| 08-13-2009, 03:43 PM | #4 |
i've got some results using LoadLibrary (sfmpq seems to work perfect) however it was rather easy and now i want a crosspltform desision (mac especially) |
| 08-13-2009, 04:59 PM | #5 | |
Quote:
Mac is a pain in ass for map development anyway. |
| 08-13-2009, 05:03 PM | #6 |
TC should know as he is obviously a mac user... |
| 08-13-2009, 05:12 PM | #7 |
tc has usual style:) So there is no native library for mac? only ports of swmpq and stormlib? |
| 08-13-2009, 06:03 PM | #8 | |
Quote:
|
| 08-16-2009, 06:18 AM | #9 |
I know that sometime someone was successful at getting the source code for sfmpq to compile on Mac OS X. It may have needed some minor modifications, but I don't think I was told what modifications were needed. If you want to try it, I have the source code up on my site. Instructions for getting it are at http://sfsrealm.hopto.org/cgi-bin/ar...ry=1&view=7-08 |
| 08-17-2009, 06:59 AM | #10 |
yes, i saw that page before, but i was a little bit lazy to install git, so i tried to find sources in google, but something was wrong with them... There is a linux port on your site, isn't it? The good idea is try to build it on mac. |
| 08-17-2009, 11:07 AM | #11 |
sorry for double post... i've tried to compile library on linux... i did it, but without zlib support. So the question - do w3 maps use zlib compression by default? and what should i do to enable zlib on linux? added: yeah, i've done it... why didn't you created simle makefile for linux port? or small instruction?) |
| 08-19-2009, 01:53 AM | #12 |
I didn't use a makefile when I originally tested it and I haven't had any Linux distro set up on any computer here for a long time, so it has been a very long time since I tested it on Linux myself. As far as I know, I think wc3 does use the zlib compression by default for everything, so if this is for wc3 files, you will for sure need to have the zlib compression support enabled in the mpq library. By the way, the files in the linux folder of the source tree are supposed to go in the same folder as the mpq library source code when not compiling on Windows. If you want to know what files to compile and link in for the library (and possibly what defines might be needed), for now you will need to look at the Visual C++ project file. The project you will want to look at would most likely be the one for the static library (sfmpqlib). |
| 08-19-2009, 05:37 AM | #13 |
Thank's, but i've already compiled it for linux and mac... I have awful makefiles for both builds, but they works. Unfortunately, i had to fix sources a little. Zlib compression is enabled linking to any zlib library installed in system - it's easy when you know it:). |
| 08-19-2009, 06:54 AM | #14 |
for MAC, I know a good library here (C++), though I really don't know how to use it, but it's prety well documented |
| 08-19-2009, 10:40 AM | #15 |
What kinds of fixes did it need? As stated above, I haven't compiled it on anything else for a while, so I don't know what kinds of things might be breaking the build. I'm sure they were minor though, because after I initially made it work on Linux, I tried to keep any future code portable. |
