This question has come up in the past, but I can't find an easy solution. Thanks to advice from Dominus, I was able to build a static-linked DOSBox with screenshot support under OS X, and now I'd like to try doing the same thing with my Win32-based project, which I'm building under Visual C 2010 Express.
If you have a 64-bit Mac and are running Mac OS X 10.8, you can expect to be automatically upgraded to Tor Browser 4.5, optimized for your hardware, later this month. If you are running OS X 10.6 or 10.7, however, you will need to update manually once that version of Tor Browser is released, as described in the end-of-life announcement last year. To build ImageMagick with png and jpeg delegates on a Mac - OSX. Tar xvzf ~/Desktop/libpng-1.6.21.tar.gz mv libpng-1.6.21 png cd png.
Bloodbat wrote:For libpng just point your additional libraries and include directories to wherever you compiled the new zlib, and add it to additional dependencies (linker - input), which could be the problem when compiling DosBox, as it is a linker error; also, make sure everything is compiled using the SAME library (i.e Multi-Threaded /MT if you don't want people having to download and install msvcrt prior to using your build) I know that Dominus's advice is the right way to go in the long term, but meanwhile, bloodbat's advice seems to have been exactly what I needed. (I'm not quite ready to set up everything under MinGW and compile all the libraries, etc.
![]()
but I'll get to it before too long, I hope.) I'm not sure I completely understood the advice, but this is what I did (omitting a few hours wasted on mistakes), and I ended up with a build that successfully made a screenshot, which is exactly what I was hoping for. If any of this was wrong, please let me know.
I'm writing it all down partly to remind myself of what I did, so I'll be able to reproduce it when I try to do the same thing with my custom project, and also because it might be useful to someone else. I went back and rebuilt libpng165 after changing the properties so that under C/Additional Include Directories, I included. Zlib-1.2.5, and under Librarian/Additional Library Directories, I also included. I made sure that I was using MultiThreaded /MT. As I mentioned above, this built libpng in.
Lpng165 projects vstudio libpng Release Library 2. Then I went back to the DOSBox project, and changed the properties so that under C/Additional Include Directories, I included.
Lpng165 projects vstudio libpng Release Library, and added the same directory under Librarian/Additional Library Directories. I found that I was building DOSBox (in this testing project) for DLL, not MultiThreaded /MT, so I fixed that and tried building. A flood of error messages showed me that I had to list MSVCRT under Linker/Input/Ignore Specific Default Libraries. Finally, because bloodbat mentioned it, and I had stupidly left it out earlier, I went to Linker/Input/Additional Dependencies, and put libpng16.lib at the top of the list. I built with no errors and the usual warnings, plus this message, which I had never seen before: Code: libpng16.lib(pngwrite.obj): MSIL.netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance So, after some googling, I figured out that in the DOSBox properties, I needed to go to Linker/Optimization/Link Time Code Generation, and set it to 'Link Time Code Generation /LTCG' - and that removed the message. If any of this is (1) wrong, (2) stupid, or (3) merely unnecessary, I hope someone will let me know. Again, a thousand thanks for sorting this out for me.
I could never even have got started without your help. Oldbie Posts: 757 Joined: 2010-2-14 @ 02:00. Emendelson wrote:I'm not sure I completely understood the advice, but this is what I did (omitting a few hours wasted on mistakes), and I ended up with a build that successfully made a screenshot, which is exactly what I was hoping for. If any of this was wrong, please let me know. I'm writing it all down partly to remind myself of what I did, so I'll be able to reproduce it when I try to do the same thing with my custom project, and also because it might be useful to someone else. I went back and rebuilt libpng165 after changing the properties so that under C/Additional Include Directories, I included. Zlib-1.2.5, and under Librarian/Additional Library Directories, I also included.
I made sure that I was using MultiThreaded /MT. As I mentioned above, this built libpng in. Lpng165 projects vstudio libpng Release Library 2.
Then I went back to the DOSBox project, and changed the properties so that under C/Additional Include Directories, I included. Lpng165 projects vstudio libpng Release Library, and added the same directory under Librarian/Additional Library Directories. I found that I was building DOSBox (in this testing project) for DLL, not MultiThreaded /MT, so I fixed that and tried building. A flood of error messages showed me that I had to list MSVCRT under Linker/Input/Ignore Specific Default Libraries. Finally, because bloodbat mentioned it, and I had stupidly left it out earlier, I went to Linker/Input/Additional Dependencies, and put libpng16.lib at the top of the list. I built with no errors and the usual warnings, plus this message, which I had never seen before: Code: libpng16.lib(pngwrite.obj): MSIL.netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance So, after some googling, I figured out that in the DOSBox properties, I needed to go to Linker/Optimization/Link Time Code Generation, and set it to 'Link Time Code Generation /LTCG' - and that removed the message.
If any of this is (1) wrong, (2) stupid, or (3) merely unnecessary, I hope someone will let me know. Again, a thousand thanks for sorting this out for me. I could never even have got started without your help.
You're welcome, I'm glad it worked for you. I see nothing wrong in my quasi-zombie state; libpng16 must be compiling with /LTCG by default, link time code generation you probably want anyway, so it's good you enabled it. Oldbie Posts: 792 Joined: 2009-12-06 @ 07:11.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |