|
1 | 1 | LCM port to Windows changes.
|
2 | 2 |
|
3 |
| -IMPORTANT: The current port will only work on Windows XP and newer versions of Windows. |
4 |
| -Some underlying Windows POSIX functions only became available with XP and later, and they are required |
5 |
| -to make LCM work. |
6 |
| - |
7 |
| -All Windows changes (except pointer casting) are wrapped by #ifdef WIN32 or by #ifndef WIN32 ifdefs. |
8 |
| - |
9 |
| -In general, we tried to make minimal changes to the code, so building under Windows will generate lots of |
10 |
| -casting type warnings. |
11 |
| - |
12 |
| -Since the Visual Studio compiler (VS 2005) does not support C99, we had to compile the .C code as if it |
13 |
| -was C++. The project files reflect this, so there should be nothing additional to do to make them work. |
14 |
| -However, please note that .C files created by lcmgen will most likely need to be compiled as C++ under |
15 |
| -VS 2005. |
16 |
| - |
17 |
| -For the Visual Studio build we require an installation of GLib, with header files, libraries and DLLs. |
18 |
| -We built with version glib-2.20.5, although we don't have any revision requirements that we know of. |
19 |
| -The GLib DLLs will need to be somewhere on the system path, or the glib\bin folder will need to be |
| 3 | +IMPORTANT: The current port will only work on Windows XP and newer versions of |
| 4 | +Windows. Some underlying Windows POSIX functions only became available with XP |
| 5 | +and later, and they are required to make LCM work. |
| 6 | + |
| 7 | +All Windows changes (except pointer casting) are wrapped by #ifdef WIN32 or by |
| 8 | +#ifndef WIN32 ifdefs. |
| 9 | + |
| 10 | +In general, we tried to make minimal changes to the code, so building under |
| 11 | +Windows will generate lots of casting type warnings. |
| 12 | + |
| 13 | +Since the Visual Studio compiler (VS 2005) does not support C99, we had to |
| 14 | +compile the .C code as if it was C++. The project files reflect this, so there |
| 15 | +should be nothing additional to do to make them work. However, please note |
| 16 | +that .C files created by lcmgen will most likely need to be compiled as C++ |
| 17 | +under VS 2005. |
| 18 | + |
| 19 | +For the Visual Studio build we require an installation of GLib, with header |
| 20 | +files, libraries and DLLs. We built with version glib-2.20.5, although we |
| 21 | +don't have any revision requirements that we know of. The GLib DLLs will need |
| 22 | +to be somewhere on the system path, or the glib\bin folder will need to be |
20 | 23 | added to the PATH environment variable.
|
21 | 24 |
|
22 |
| -GLib for Windows can be obtained at: http://www.gtk.org/download-windows.html |
23 |
| -Be sure to download both the "Binaries" and the "Dev" zip files. |
| 25 | +GLib for Windows can be obtained at: http://www.gtk.org |
| 26 | +You'll need the following packages: |
| 27 | + GLib Run-Time, Dev |
| 28 | + gettext-runtime Run-Time |
24 | 29 |
|
25 |
| -The Visual Studio build requires an environment variable GLIB_PATH, which expects to find headers |
26 |
| -in $(GLIB_PATH)\include\glib-2.0 and libraries in $(GLIB_PATH)\lib. |
| 30 | +The Visual Studio build requires an environment variable GLIB_PATH, which |
| 31 | +expects to find headers in $(GLIB_PATH)\include\glib-2.0 and libraries in |
| 32 | +$(GLIB_PATH)\lib. |
27 | 33 |
|
28 |
| -The overall lcm.sln Solution file has the project dependencies set, so it knows it needs to build |
29 |
| -the lcm.dll before building other projects, etc. All projects can be built from the top level. |
| 34 | +The overall lcm.sln Solution file has the project dependencies set, so it knows |
| 35 | +it needs to build the lcm.dll before building other projects, etc. All projects |
| 36 | +can be built from the top level. |
30 | 37 |
|
31 |
| -The bulk of our changes are in lcm_udp.c and lcm_file.c. We relied on glib to provide the regex functionality. |
32 |
| -The pipe() functionality has been re-implemented using sockets, which should now provide almost identical |
| 38 | +The bulk of the changes are in lcm_udp.c and lcm_file.c. We relied on glib to |
| 39 | +provide the regex functionality. The pipe() functionality has been |
| 40 | +re-implemented using sockets, which should now provide almost identical |
33 | 41 | compatibility to the UNIX pipe() functions.
|
34 | 42 |
|
35 |
| -All of the test cases in liblcm-test build and run properly. They even run cross-platform, from Windows to |
36 |
| -Linux and reverse. |
37 |
| - |
38 |
| -When writing programs that use LCM (but are not internal to LCM), add "WinSpecific/include" to your include path. |
| 43 | +When writing programs that use LCM (but are not internal to LCM) with Visual |
| 44 | +Studio 2008 and earlier, add "WinSpecific/include" to your include path to get |
| 45 | +<stdint.h> and <inttypes.h>. |
0 commit comments