Open main menu

Difference between revisions of "Compiling ScummVM/Visual Studio/Compiling Libraries"

The libmpeg2 project files can be used, with a change. Update accordingly
(Merge the two different paragraphs for libmpeg2)
(The libmpeg2 project files can be used, with a change. Update accordingly)
Line 226: Line 226:
=== libmpeg2 ===
=== libmpeg2 ===


Since the MSVC project files for libmpeg2 haven't been updated for a *very* long time, we'll need to recreate them from scratch. For libmpeg2, ALL the MMX optimizations have to be disabled, as libmpeg2 is using AT&T ASM syntax (GCC style), whereas MSVC uses the Intel syntax.
The VC6 solution files (inside the vc++ folder) need to be used for this library, but first they all need to be changed to DOS format, otherwise Visual Studio will complain that the project files are corrupted.
For libmpeg2, ALL the MMX optimizations have to be disabled, as libmpeg2 is using AT&T ASM syntax (GCC style), whereas MSVC uses the Intel syntax.


In order to create the project files, do the following:
In order to create the project files, do the following:
* Create a new empty C++ project, named "libmpeg2"
* Copy inttypes.h and config.h from the vc++ directory into the libmpeg2 directory
* Copy inttypes.h and config.h from the vc++ directory into the libmpeg2 directory
* Copy attributes.h and mpeg2.h from the include directory into the libmpeg2 directory
* Copy attributes.h and mpeg2.h from the include directory into the libmpeg2 directory
* Add the following files to the project, from the libmpeg2 folder:
* Make sure that your project includes these files, and remove the included project files:
** alloc.c
** alloc.c
** config.h
** config.h
Line 256: Line 256:
</source>
</source>
* Change configuration to "Release"
* Change configuration to "Release"
* Right click project->Properties
* Right click project->Properties, and make sure that the following are set correctly:
** Configuration Properties->General, change "Configuration type" to "Static library(.lib)"
** Configuration Properties->General, "Configuration type" should be "Static library(.lib)"
** Configuration Properties->C/C++->Code Generation, change "Runtime Library" to "Multi-threaded (/MT)"
** Configuration Properties->C/C++->Code Generation, "Runtime Library" should be "Multi-threaded (/MT)"
** Configuration Properties->Librarian->General->Set "Link Time Code Generation" to "No"


Now, we'll remove all the MMX optimization references from the files that have been added to the project. Perform the following:
Now, we'll remove all the MMX optimization references from the files that have been added to the project. Perform the following:
1,502

edits