[Up: Installation]
[Previous: Installing MICO under Unix] [Next: Supported Platforms]
Installing MICO under Windows using the Visual-C++ compiler is sufficiently different to dedicate it its own section. Beware that this compiler is not among the technically most solid pieces of engineering and you should make sure that you have applied all Service Packs there are (Microsoft terminology for bug fixes). It is also advisable to check the latest release notes for MICO on the Windows platform which are contained in the file README-WIN32.
You will need Visual-C++ 5.0 Service Pack 3 or (preferred) Visual-C++ 6.0 Service Pack 2 to compile MICO for Windows. Note that without Service Pack 3 for Visual-C++, you will not be able to compile the sources or write MICO applications. Windows version of flex and bison are not required. The MICO distribution already contains the files generated by these tools. VC++ 5.0 SP3 is available from:
http://www.microsoft.com/msdownload/vs97sp/full.asp
VC++ 6.0 service packs are available at:
http://msdn.microsoft.com/vstudio/sp/default.asp
The Windows 95 implementation of the TCP/IP protocol stack cause problems with MICO applications. You need to download and install the WinSock2 library which fixes these problems. You can download WinSock2 from the Microsoft web server for free:
http://www.microsoft.com/windows95/downloads/contents/wuadmintools/\ s_wunetworkingtools/w95sockets2/default.asp?site=95
IMPORTANT: You also need to make sure that the environment variables are set properly for Visual-C++. There is a batch file called VCVARS32.bat specifically for this purpose. Be sure to run this batch file -- which is part of VC++ -- before you try to compile MICO.
Once you have made sure that your Windows platform meets all the above mentioned prerequisits, you can unpack the MICO sources. The sources are shipped as a zipped archive on the CD called
mico-<version>.zip
Where <version> is the version number of the MICO release contained on the CD. Unpack the archive at the desired location.
Change to the directory where you have unzipped the MICO sources and edit the file MakeVars.win32. Set the SRCDIR variable to the location of the MICO directory (no trailing backslash). There is no need to run a configure script. MICO is pre-configured for Windows.
VC++ comes with its own Makefile tool called nmake. Unfortunately this tool is sufficiently incompatible with other make tools. For this reason the MICO distribution contains a second set of Makefiles. These Makefiles have the suffix .win32 and are tailored to work with nmake. To compile MICO on your system, type the following in the MICO top level directory:
nmake /f Makefile.win32
If you are running Windows 95/98, the command line shell suffers from some serious deficiencies. On those platforms you need to invoke the compilation process using the following command instead:
nmake /f Makefile.win32 w95-all
The make process will build all the necessary DLLs and executables in a subdirectory called win32-bin, which will be created during compilation. The content of this directory is the only thing you need for building MICO applications. You can move it to your preferred location. The build will require around 150MB (the demo directory another 90MB).
You should modify the PATH environment variable to include
this directory. If, for example, the MICO sources were unzipped in
C:\mico
, then type the following:
PATH C:\mico\win32-bin;%PATH%
All the examples that come with MICO depend on Makefiles for the building process. The advantage of a tool like Visual-C++ is that it offers an Integrated Development Environment (IDE), which combines editor, compiler and debugger in one tool. The IDE also manages all the files which belong to a project. This section gives you an indication on how to use the IDE together with MICO. First you have to tell Visual-C++, where MICO is located. You do this in the Tools/Options dialog, in the Directories tab, you have to set the Include path to the following directories:
C:\mico\win32-bin\include\windows C:\mico\win32-bin\include
These lines have to be first in the list (use the move buttons to move them to the first position). Next, set the Library path to (order does not matter):
C:\mico\win32-bin\lib
and the Executables path accordingly to:
C:\mico\win32-bin
In the project settings you have to make the following changes:
Additionally, you can integrate your IDL files in the build process. First you have to add the IDL file to your project, then goto Project/Settings and select this file, or right click on the IDL file and choose Settings, select the Custom Build tab and enter:
idl --c++-suffix=cpp [other options] $(InputPath)
into the Build Command listbox. In the Output files list box enter:
$(InputName).h $(InputName).cpp
For inserting $(..) you can also use the popup buttons at the bottom of the dialog, or you can use the real filename instead. The output files of the IDL compiler are created in the current directory; normally the root of the project. If the output filename is foo.cpp, then you have to add foo.cpp to the project. This can be done even before the file exists, by entering it into the file dialog.
[Previous: Installing MICO under Unix] [Next: Supported Platforms]
[Up: Installation]