Daniel Veillard | 8f2cc57 | 2001-01-17 08:19:35 +0000 | [diff] [blame] | 1 | ----------------------------------------------------------------------- |
Daniel Veillard | 50f3437 | 2001-08-03 12:06:36 +0000 | [diff] [blame] | 2 | [24. July, 2001, igor@stud.fh-frankfurt.de] |
| 3 | |
| 4 | And again there are new MSVC project files for libxml2. |
| 5 | |
| 6 | You can find the project files for MSVC 6.0 and higher in win32/dsp/ |
| 7 | subdirectory of the source tree. You should load the file libxml2.dsw |
| 8 | into the IDE. This is the workspace file which contains all projects |
| 9 | and their interdependencies. |
| 10 | |
| 11 | Check the file xmlwin32version.h for optional features and enable or |
| 12 | disable them, as it suits you. The defaults are apropriate for most |
| 13 | people, so there is usually no need to mess with this. |
| 14 | |
| 15 | If you receive few compiler warnings, ignore them. These are harmless |
| 16 | and shall dissapear in the future. |
| 17 | |
| 18 | From now on, all object files produced by the compiler end up in the same |
| 19 | directory for each project, no matter if you compile with debugging |
| 20 | turned on or not. This means that a release build shall overwite the |
| 21 | debug build and vice versa. This makes the dependency tracking easier, |
| 22 | but there are people who don't like this for some reason. |
| 23 | |
| 24 | The new project files from win32/dsp/ make any other project files |
| 25 | obsolete. Previous project files shall remain in their usual location |
| 26 | for some time and end up removed if noone complains. |
| 27 | |
| 28 | ----------------------------------------------------------------------- |
Daniel Veillard | 8f2cc57 | 2001-01-17 08:19:35 +0000 | [diff] [blame] | 29 | [January the 16th, 2001, igor@stud.fh-frankfurt.de] |
| 30 | |
| 31 | The following applies only if you use Microsoft Visual C/C++ compiler, |
| 32 | in combination with Visual C++ IDE. Risk a glance further below for |
| 33 | information on using GNU C compilers, such as Mingw32. |
| 34 | |
| 35 | There are two new project files in win32/libxml2: |
| 36 | |
| 37 | libxml2_a.dsp: Use this one to build an object archive, a thing known |
| 38 | as a static library in the wonderful world of Windows. |
| 39 | |
| 40 | libxml2_so.dsp: Use this one to build a shared object, or a DLL if you |
| 41 | prefer calling it using the dialect mentioned above. |
| 42 | |
| 43 | There are few things to note about these project files and their |
| 44 | differences to the originally supplied project file (libxml2.dsp): |
| 45 | |
| 46 | 1. C-Runtime is not LIBC anymore. LIBC is fairly old and should be |
| 47 | considered obsolete today. Microsoft had considered it apropriate to |
| 48 | produce a better C-Runtime library, and indeed, their new one is |
| 49 | called MSVCRT. All decent Win32 systems have this newer library, save |
| 50 | for the oldest incarnations of Win95, which can be ignored safely. |
| 51 | Following that, I changed the dependencies and now both project files |
| 52 | mentioned above use MSVCRT. |
| 53 | |
| 54 | 2. Both project files cause the resulting binary to depend on a shared |
| 55 | version of MSVCRT. Yes, that is what I am saying, the C-Runtime is |
| 56 | linked dynamically, not statically. This enables the programmer to do |
| 57 | likewise with his libxml2-based software, an action I like to think |
| 58 | everyone would perform without hesitation. |
| 59 | |
| 60 | 3. There was a small flaw in the previous project file. The source file |
| 61 | xpointer.c was not included in the project file and that caused a |
| 62 | linkage problem with libxml2-based program, but not with libxml2 |
| 63 | itself, if XPointer feature was enabled. This is now fixed. |
| 64 | ----------------------------------------------------------------------- |
| 65 | |
| 66 | |
| 67 | If you're creating libxml2 with the "mingw" compiler, just copy the |
| 68 | Makefile.mingw to the root directory as "Makefile", edit the PREFIX |
| 69 | value, and run "make". |
| 70 | |
| 71 | If you're using MSVC, here are some instructions for how you can |
| 72 | proceed: |
| 73 | |
| 74 | The configuration stuff (i.e. what should be enabled/disabled) is in |
| 75 | xmlversion.h I only tested it compiled fine with the current settings |
| 76 | (that is nearly everything disabled, I didn't need many features) |
| 77 | |
| 78 | ---------------------------- |
| 79 | |
| 80 | How did I get everything in place so the MSDev project works from the |
| 81 | original archive? |
| 82 | |
| 83 | from the cygwin prompt (http://sources.redhat.com/cygwin) : |
| 84 | $ ./configure --disable-corba --without-ftp --without-http --without-html --wit |
| 85 | hout-xpath --without-iconv --without-debug |
| 86 | |
| 87 | built the project file for the static library |
| 88 | |
| 89 | ---------------------------- |
| 90 | |
| 91 | diff after doing the changes and cleaning up the generated stuff: |
| 92 | |
| 93 | [Note: this is out of date] |
| 94 | diff libxml2-2.2.4/xmlversion.h libxml2-2.2.4-reference/xmlversion.h |
| 95 | 38c38 |
| 96 | < #if 0 |
| 97 | --- |
| 98 | > #if 1 |
| 99 | 47c47 |
| 100 | < #if 0 |
| 101 | --- |
| 102 | > #if 1 |
| 103 | 56c56 |
| 104 | < #if 0 |
| 105 | --- |
| 106 | > #if 1 |
| 107 | 74c74 |
| 108 | < #if 0 |
| 109 | --- |
| 110 | > #if 1 |
| 111 | 83c83 |
| 112 | < #if 0 |
| 113 | --- |
| 114 | > #if 1 |
| 115 | 92c92 |
| 116 | < #if 0 |
| 117 | --- |
| 118 | > #if 1 |