[AD] Build problems with MSVC |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Hi.
All the following applies to building the CVS version of Allegro with
MSVC in a cygwin environment:
Build documentation is not explicit about CVS, so I failed to make
depend and fixdll.bat the lot. Also, current version requires g++ to
build the dependencies. Cygwin users might need to chmod 775 the bat
file to execute it. Patch attached.
Things left to do:
Order of mkdir/cp during install is wrong, so it can fail if there's no
include directory:
[ghankiewicz@xxxxxxxxxx] [~/project/allegro/allegro]$ make install DEBUGMODE=1
cp include/allegro.h /include
mkdir /include/allegro
mkdir: cannot create directory `/include/allegro': No such file or directory
make: *** [/include/allegro] Error 1
Some missing checks?
[ghankiewicz@xxxxxxxxxx] [~/project/allegro/allegro]$ make DEBUGMODE=1
Your MSVCDIR environment variable is not set!
See the docs/build/msvc.txt file!
[ghankiewicz@xxxxxxxxxx] [~/project/allegro/allegro]$ make DEBUGMODE=1 install
The debugging MSVC library has been installed.
I must be lucky to have built the debug version without MSVCDIR!
? msvc_docs.diff
Index: .cvsignore
===================================================================
RCS file: /cvsroot/alleg/allegro/.cvsignore,v
retrieving revision 1.7
diff -u -r1.7 .cvsignore
--- .cvsignore 26 Apr 2003 09:07:08 -0000 1.7
+++ .cvsignore 23 Nov 2003 18:06:47 -0000
@@ -14,3 +14,4 @@
autom4te.cache
readme.txt
makefile.info
+*.pdb
Index: docs/.cvsignore
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/.cvsignore,v
retrieving revision 1.3
diff -u -r1.3 .cvsignore
--- docs/.cvsignore 18 Nov 2001 15:59:43 -0000 1.3
+++ docs/.cvsignore 23 Nov 2003 18:06:47 -0000
@@ -1,3 +1,4 @@
allegro.dvi
allegro.ps*
makedoc
+*.pdb
Index: docs/chm/.cvsignore
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/chm/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- docs/chm/.cvsignore 3 Jun 2002 22:27:00 -0000 1.1
+++ docs/chm/.cvsignore 23 Nov 2003 18:06:47 -0000
@@ -1,3 +1,4 @@
*.h*
*.chm
*.txt
+*.css
Index: docs/src/build/msvc._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/build/msvc._tx,v
retrieving revision 1.2
diff -u -r1.2 msvc._tx
--- docs/src/build/msvc._tx 18 Sep 2003 09:33:51 -0000 1.2
+++ docs/src/build/msvc._tx 23 Nov 2003 18:06:47 -0000
@@ -43,17 +43,20 @@
GNU make (<tt>mak*b.zip</tt>).<br>
Optional: GNU sed (<tt>sed*b.zip</tt>). Used by "<tt>make depend</tt>" and
"<tt>fixdll.bat</tt>".<br>
- Optional: GNU sort (<tt>txt*b.zip</tt>). Used by "<tt>fixdll.bat</tt>".<br><br>
+ Optional: GNU sort (<tt>txt*b.zip</tt>). Used by "<tt>fixdll.bat</tt>".<br>
+ Optional: GNU C++ (<tt>gpp*b.zip</tt>). Used by "<tt>make depend</tt>".<br><br>
- <li>MinGW: compiler (mingw-runtime, gcc, binutils).<br>
+ <li>MinGW: compiler (mingw-runtime, gcc, g++, binutils).<br>
GNU make.<br>
Optional: GNU sed. Used by "<tt>make depend</tt>" and "<tt>fixdll.bat</tt>".<br>
- Optional: GNU sort (textutils). Used by "<tt>fixdll.bat</tt>".<br><br>
+ Optional: GNU sort (textutils). Used by "<tt>fixdll.bat</tt>".<br>
+ Optional: GNU C++ (g++). Used by "<tt>make depend</tt>".<br><br>
- <li>Cygwin: compiler (cygwin, gcc, binutils)<br>
+ <li>Cygwin: compiler (cygwin, gcc, g++, binutils).<br>
GNU make.<br>
Optional: GNU sed. Used by "<tt>make depend</tt>" and "<tt>fixdll.sh</tt>"<br>
- Optional: GNU sort (textutils). Used by "<tt>fixdll.sh</tt>".
+ Optional: GNU sort (textutils). Used by "<tt>fixdll.sh</tt>".<br>
+ Optional: GNU C++ (g++). Used by "<tt>make depend</tt>".<br><br>
</ul></ul>
Allegro should work ok with MSVC versions 4, 5, 6 and 7.
@@ -105,6 +108,10 @@
If you are using Cygwin, type "<tt>./fix.sh msvc --utod</tt>". Otherwise (i.e if
you are using DJGPP or MinGW), type "<tt>fix.bat msvc</tt>".
+ If you are compiling from CVS, before continuing you must run both
+ "<tt>make depend</tt>" and "<tt>misc\fixdll.bat</tt>" as explained below, or the build will
+ fail asking for some <tt>.inc</tt> file.
+
Type "<tt>make</tt>". Then go do something interesting while everything compiles.
When it finishes compiling, type "<tt>make install</tt>" to set the library up
ready for use.
@@ -120,12 +127,14 @@
additionally "<tt>STATICLINK=1</tt>" to the make commands above.
If your copy of Allegro doesn't include the <tt>makefile.dep</tt> dependency files
- (unlikely, unless you have run "<tt>make veryclean</tt>" at some point), you can
- regenerate them by running "<tt>make depend</tt>".
+ (unlikely, unless you have run "<tt>make veryclean</tt>" at some point or are
+ building the CVS version), you can regenerate them by running
+ "<tt>make depend</tt>".
If your copy of Allegro doesn't include the linker .def file (unlikely,
- unless you have run "<tt>make veryclean</tt>" at some point), you can regenerate
- it by running "<tt>misc\fixdll.bat</tt>".
+ unless you have run "<tt>make veryclean</tt>" at some point or are building the CVS
+ version), you can regenerate it by running "<tt>misc\fixdll.bat</tt>". Cygwin users
+ might need to "<tt>chmod 775 misc\fixdll.bat</tt>" before to make it executable.
Once the build is finished you can recover some disk space by running
"<tt>make compress</tt>", which uses the UPX program to compress the executable
Index: lib/msvc/.cvsignore
===================================================================
RCS file: /cvsroot/alleg/allegro/lib/msvc/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- lib/msvc/.cvsignore 17 Nov 2001 12:37:34 -0000 1.2
+++ lib/msvc/.cvsignore 23 Nov 2003 18:06:47 -0000
@@ -1,3 +1,6 @@
allegro.def
*.lib
*.dll
+*.exp
+*.ilk
+*.pdb