-
Notifications
You must be signed in to change notification settings - Fork 40
/
ACE-INSTALL.html
2996 lines (2571 loc) · 136 KB
/
ACE-INSTALL.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
http://www.dre.vanderbilt.edu/~schmidt/PDF/Svc-Conf.pdf<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><!-- $Id: ACE-INSTALL.html 97334 2013-09-16 09:37:28Z johnnyw $ -->
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Building and Installing ACE and Its Auxiliary Libraries and Services</title>
<link rev="made" href="mailto:[email protected]"></head>
<body bgcolor="#ffffff" link="#000fff" text="#000000" vlink="#ff0f0f">
<hr>
<h1>Building and Installing ACE and Its Auxiliary Libraries and Services</h1>
<h2>Synopsis</h2>
The file explains how to build and install ACE, its Network Services,
test suite and examples on the various OS platforms and compilers that
it has been ported to. Please consult the <a href="NEWS">NEWS</a> and
<a href="ChangeLog">ChangeLog</a> files to see whether any recent changes
to the release will affect your code. In addition, you should check
out our <a
href="docs/ACE-development-process.html">development
process</a>. As you start working with ACE, we suggest you get copies
of the <a
href="http://www.cs.wustl.edu/%7Eschmidt/ACE/book1/">C++NPv1</a>, <a
href="http://www.cs.wustl.edu/%7Eschmidt/ACE/book2/">C++NPv2</a>, and
<a href="http://www.riverace.com/acebooks/">APG</a> books to help
guide you after you've built and installed ACE. You should also
consult the <a
href="docs/ACE-FMM.html">ACE
Frequently Made Mistakes page</a>. If you encounter any problems or
would like to request an enhancement, then use our <a
href="docs/usage-bugzilla.html">bug
tracking system</a> to submit a report in accordance with our <a
href="docs/ACE-bug-process.html">bug
report process</a>.<p>
</p><h2>Document Index</h2>
<ul>
<li><a href="#platforms">Platforms, C++ Compilers, and Support</a>
</li><li><a href="#installpre">Installation prerequisites</a>
</li><li><a href="#aceinstall">Building and Installing ACE</a>
</li><li><a href="#svcsinstall">Building and Installing ACE Network Services</a>
</li><li><a href="#sslinstall">Building and Installing The ACE_SSL Library</a>
</li><li><a href="#guireactor_install">Building and Using GUI Reactors Libraries</a>
</li><li><a href="#installnotes">Installation Notes</a>
</li><li><a href="#g++">Compiling ACE with GNU g++</a>
</li><li><a href="#minimum_build">What Do I Need to Build for TAO?</a>
</li><li><a href="#resource_requirements">System Resource Requirements</a>
</li><li><a href="#MPC">General MPC Information</a>
</li><li><a href="#eclipse">Working with ACE in Eclipse</a>
</li><li><a href="#advanced">Advanced Topics</a>
</li><li><a href="#power">Building from Subversion</a>
</li></ul>
<p></p><hr><p>
</p><h2><a name="platforms">Platforms, C++ Compilers, and Support</a></h2>
<p>ACE has been ported to a large number of platforms using many different
compilers over the years.
The <a href="http://www.dre.vanderbilt.edu/">DOC group</a>,
<a href="http://www.riverace.com/">Riverace</a>,
<a href="http://www.theaceorb.com/">OCI</a>,
<a href="http://www.theaceorb.nl/">Remedy IT</a>, and members of the ACE
user community have all contributed ports to make ACE the successful
and far-reaching toolkit it is today. Any UNIX/POSIX/Windows
variation is probably an easy target platform for ACE. If you have
<a href="docs/ACE-porting.html">porting questions</a> or have a problem
compiling the ACE source distribution, please contact one of the
commercial support companies, or send a copy of the
<a href="PROBLEM-REPORT-FORM">PROBLEM-REPORT-FORM</a>, located in the
ACE_wrappers directory, to either the <a href="news:comp.soft-sys.ace">ACE
Newsgroup</a> or the <a href="mailto:[email protected]">ace-users
mailing list</a>.
The DOC groups at Washington University, UC Irvine, and Vanderbilt
University provide only "best effort" support for non-sponsors for the
latest release, as described in <a href="docs/ACE-bug-process.html">
docs/ACE-bug-process.html</a>.
Thus, if you need more "predictable" help, or help with earlier versions of
ACE, it's recommend that you check out the
<a href="http://www.cs.wustl.edu/~schmidt/commercial-support.html">list of
commercial support companies</a> for additional assistance.
</p>
<p>The responsibility for maintaining ACE across the wide range of
supported platforms is divided among a few different groups:
<ul>
<li>The DOC group maintains platforms used in the course of their research
and sponsored work</li>
<li>Companies that provide support (Riverace, OCI, and Remedy IT), maintain
platforms they support in the course of their various service offerings</li>
<li>The ACE user community maintains any other desired platforms.</li>
</ul>
The <a href="http://www.dre.vanderbilt.edu/scoreboard/" target="_blank">
build scoreboard</a>
records the current status of build and regression testing during
development by all of the above groups. It is available to all users wishing
to provide build results. Members of the ACE community that maintain ACE on
platforms not maintained by the DOC group, Riverace, OCI, or Remedy IT are
encouraged to provide build and regression test results for the scoreboard
to ensure that all in-use platforms are represented.
See the <a href="https://svn.dre.vanderbilt.edu/viewvc/autobuild/trunk/README?revision=HEAD" target="_blank">autobuild README</a> for more information about
how to set up a build; contact one of the above groups to inquire about how
to get your build results recorded on the scoreboard.</p>
<p>Because older
platforms that are not maintained tend to fall into a broken state and
clutter the ACE sources with code that is no longer used, the development
team reserves the right to remove ACE configuration files and source code
specific to inactive platform configurations that are not
listed on the scoreboard.</p>
<p>The table below summarizes each group's role and where you can get more
detailed information. For information on TAO's platform coverage and
support, please also see <a href="TAO/TAO-INSTALL.html">TAO's install
document</a>.</p><p>
<table border="1" width="75%">
<caption><b>Groups Involved in ACE Development and Support<br></b></caption>
<thead>
<tr valign="top">
<th>Group</th>
<th>Platforms</th>
<th>For more information</th>
</tr>
</thead><tbody>
<tr>
<th>DOC Group</th>
<td>Windows 2000, XP (MSVC++ 7.1, 8, 9, and 10);
many versions of Linux/Intel (many compilers).
</td>
<td>DOC sites at <a href="http://www.dre.vanderbilt.edu/">ISIS</a>,
<a href="http://doc.ece.uci.edu/">UCI</a> and
<a href="http://tao.doc.wustl.edu/">Washington University</a>
</td>
</tr>
<tr>
<th>Riverace</th>
<td>Offers ACE
<a href="http://www.riverace.com/training.htm">training</a>,
<a href="http://www.riverace.com/support.htm">support</a> and
<a href="http://www.riverace.com/consult.htm">consulting services</a>
for many platforms including AIX, HP-UX, Linux, Solaris, and Windows.
</td>
<td>Riverace's <a href="http://www.riverace.com/support.htm">ACE
Support page</a>.</td>
</tr>
<tr>
<th>OCI</th>
<td>Maintains ACE on certain platforms required for their TAO
software and service offerings.
</td>
<td>OCI's <a href="http://www.theaceorb.com/">web site</a> and
the TAO <a href="TAO/TAO-INSTALL.html">install document</a></td>
</tr>
<tr>
<th>Remedy IT</th>
<td>Maintains ACE on many platforms required for their ACE and
TAO service offerings. We support AIX,
CodeGear C++ Builder 2007/2009, CodeGear RAD Studio 2007, Embarcadero C++ Builder 2010/XE/XE4,
Windows CE, MinGW, Microsoft Visual C++ 7.1/8/9/10, GCC,
Cygwin, VxWorks 6.x (kernel and rtp), OpenVMS 8.3 on IA64,
BlueCAT Linux, RedHat Linux, Fedora, MacOSX, Solaris,
Tru64, SuSE Linux on Alpha/IA32/EM64T/IA64, RTEMS, QNX, LynxOS,
HPUX 11i v2/v3 on IA64, and Android (android-9).
The Intel C++ compiler is supported on
Windows 32/64bit, Linux IA32/EM64T/IA64, MacOSX.
</td>
<td>Remedy IT <a href="http://www.theaceorb.nl/">web site</a> and
the TAO <a href="TAO/TAO-INSTALL.html">install document</a>
</td>
</tr>
<tr>
<th>PrismTech</th>
<td>Maintains ACE on certain platforms required for their TAO
software and service offerings, including LynxOS.
</td>
<td>PrismTech's <a href="http://www.prismtech.com/">web site</a></td>
</tr>
<tr>
<th>ACE user community</th>
<td>Responsible for continued maintenance and testing of platforms
to which ACE has been ported, but aren't supported by the
above groups. These include
Digital UNIX (Compaq Tru64) 4.0 and 5.0;
IRIX 6.x; UnixWare 7.1.0;
Linux on PPC; OpenMVS;
Tandem; SCO; FreeBSD; NetBSD; OpenBSD;
Macintosh OS X; OS/9; PharLap ETS 13;
QNX RTP and Neutrino 2.0; Interix (Windows Services for Unix)
</td>
</tr><tr>
<th>Not maintained</th>
<td>The following platforms have been ported to in the past but are
no longer maintained and may be removed from ACE at any time.
If you want to have support for these environments contact one
of the commercial support organisations. The platforms include:
Chorus; DG/UX; HP-UX 9, 10 and 11.00; pSOS;
SunOS 4.x and Solaris with SunC++ 4.x; VxWorks 5.4 and earlier;
Microsoft Visual C++ 5, 6, and 7.0; Borland C++ Builder 4, 5, 6, and 2006.
For up-to-date listings on platform that are deprecated and pending
removal from ACE, please see the <a href="NEWS">NEWS file</a>.
</td>
</tr>
<tr><td></td>
</tr>
</tbody></table></p><p>
</p><p>Although the DOC group has provided outstanding support for ACE
over the years, ACE's success has greatly increased the amount of
effort required to keep up with its maintenance, answer users'
questions, and give design guidance. Riverace offers world-class
commercial services to support ACE users. OCI, PrismTech, and Remedy
offer similar services for TAO, allowing the DOC group's primary focus
to shift back to their main goal: <em>research</em>. The DOC group is
fundamentally focused on (and <a
href="http://www.cs.wustl.edu/%7Eschmidt/resume-grants.html">funded
by</a>) advanced R&D projects. The group continues to be
intimately involved in ACE+TAO development and maintenance, but with
revised priorities for maintenance. The <a
href="docs/ACE-bug-process.html">bug
fixing policies</a> followed by the DOC group are designed to strike a
balance between their many <a
href="http://www.cs.wustl.edu/%7Eschmidt/research.html">research
projects</a> and their commitment to the ACE+TAO <a
href="http://www.cs.wustl.edu/%7Eschmidt/ACE-users.html">user
community</a>. Naturally, we will be happy to accept well-tested
patches from the ACE+TAO user community for any platforms that aren't
supported by the DOC group, Riverace, OCI or Remedy IT. </p><p>
</p><p></p><hr><p>
</p><h2><a name="installpre">Installation prerequisites</a></h2>
<p> ACE (as well as TAO and CIAO) use <A
HREF="http://downloads.ociweb.com/MPC/docs/html/MakeProjectCreator.html">MPC</A>
(MakeProjectCreator) to generate files used by all supported build
tools (such as GNUmakefiles for UNIX based platforms, sln and vcproj
files for VC71/VC8 and Embarcadero makefiles) on various platforms. To
help new users to bootstrap quickly the release bundles of ACE (as
well as TAO and CIAO) include all needed files to use the build
instructions in this document.
</p>
<p>
If it is necessary to generate
files for build tools for other compilers, one must
run MPC to generate the
appropriate files. Please see <a href="MPC/docs/USAGE">USAGE</a>, <a
href="MPC/docs/README">README</a>, and <a
href="bin/MakeProjectCreator/README">README for ACE</a> files for
details. The options that have been used to generate the above build
files can be found in <a
href="bin/MakeProjectCreator/config/global.features">
global.features</a> file.
</p>
<hr>
<h1><a name="aceinstall">Building and Installing ACE</a></h1>
The following sections explain how to build ACE on:
<ul>
<li><a href="#unix">UNIX</a></li>
<li><a href="#win32">Windows (including MinGW and Cygwin)</a></li>
<li><a href="#vxworks">VxWorks</a></li>
<li><a href="#android">Android</a></li>
<li><a href="#interix">Interix</a></li>
<li><a href="#rtems">RTEMS</a></li>
</ul>
<h2>General Rules</h2>
<ul>
<li><p>Many features in ACE can be modified by defining some macros in
<code>$ACE_ROOT/ace/config.h</code>. These macros should
<em><b>always</b></em> appear <em><b>before</b></em> including
your platform specific config file.</p>
</li><li><p>However, if you want to undefine/redefine macros defined in the
platform specific config file, these <code>#undef</code> should
come <em><b>after</b></em> the config file.</p>
</li><li> If you're planning to build ACE on multiple platforms, you may
want to consider <a href="#cloning">cloning the source tree</a>
before you start. <p>
</p></li></ul>
<hr align="left" width="50%">
<h2><a name="unix">Building and Installing ACE on UNIX</a></h2>
As of ACE 6.0.6, you can building ACE on
UNIX with:
<ol>
<li><a href="#unix_traditional">Traditional ACE/GNU Make Configuration</a></li>
</ol>
The <a href="#win32">build process for Windows</a> is different from
the UNIX methods.
<h3><a name="unix_traditional">Using the Traditional ACE/GNU Configuration</a></h3>
<p>
Here's what you need to do to build ACE using GNU Make and ACE's traditional
per-platform configuration method:</p>
<ol>
<li>Install <a href="http://ftp.gnu.org/pub/gnu/make/">GNU make</a>
3.79.1 or greater on your system (available via <code>http</code>
anonymous <code>ftp</code> from <code>ftp.gnu.org</code> in the
<code>pub/gnu/make/</code> directory).
You <em>must</em> use GNU make when using ACE's traditional
per-platform configuration method or ACE won't compile.
</li>
<li>Add an environment variable called ACE_ROOT that contains the
name of the root of the directory where you keep the ACE wrapper
source tree. The ACE recursive Makefile scheme needs this information.
There are several ways to set the ACE_ROOT variable. For example:
<blockquote>
TSCH/CSH:
<code>setenv ACE_ROOT /home/cs/faculty/schmidt/ACE_wrappers</code>
</blockquote>
<blockquote>
BASH or Bourne Shell:
<code>ACE_ROOT=/home/cs/faculty/schmidt/ACE_wrappers; export ACE_ROOT
</code>
</blockquote>
<p>
If you're building a number of versions of ACE, however, (e.g., for
different OS platforms or for different releases of ACE) you might use
the following approach (assuming TCSH/CSH):
</p><blockquote><code>setenv ACE_ROOT $cwd</code>
</blockquote>
</li>
<li>Create a configuration file, <code>$ACE_ROOT/ace/config.h</code>,
that includes the appropriate platform/compiler-specific
header configurations from the ACE source directory. For example:
<blockquote><code>
#include "ace/config-linux.h"
</code></blockquote>
The platform/compiler-specific configuration file
contains the #defines that are used throughout ACE to indicate
which features your system supports. See the
<code>$ACE_ROOT/ace/README</code> file for a description of these
macro settings. If you desire to add some site-specific or build-specific
changes, you can add them to your config.h file; place them
<strong>before</strong> the inclusion of the platform-specific
header file.
<p>
There are config files for most versions of UNIX. If there
isn't a version of this file that matches your
platform/compiler, you'll need to make one. Please send email
to the <a href="mailto:[email protected]">ace-users</a> list
if you get it working so it can be added to the master ACE
release.</p>
</li>
<li>Create a build configuration file,
<code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code>,
that contains the appropriate platform/compiler-specific
Makefile configurations, e.g.,
<blockquote><code>
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
</code></blockquote>
This file contains the compiler and Makefile directives that are
platform/compiler-specific. If you'd like to add make options, you
can add them before including the platform-specific configuration.<p>
NOTE! There really is not a # character before 'include' in the
platform_macros.GNU file. # is a comment character.
</li>
<li>If you wish to install ACE (using "make install"), set the
installation prefix in platform_macros.GNU.
<blockquote><code>
INSTALL_PREFIX = /usr/local
</code></blockquote>
Headers will be installed to $INSTALL_PREFIX/include, executables to
$INSTALL_PREFIX/bin, documentation and build system files to
$INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. The library
directory can be customized by setting INSTALL_LIB (for example,
INSTALL_LIB=lib64). With INSTALL_PREFIX set, RPATH will be enabled for
all executables and shared libraries. To disable RPATH (for example,
if $INSTALL_PREFIX/$INSTALL_LIB is already a system-known location for
shared libraries such as those listed in /etc/ld.so.conf), set the make
macro install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
</li>
<li>Note that because ACE builds shared libraries, you'll need to set
LD_LIBRARY_PATH (or equivalent for your platform) to the directory
where binary version of the ACE library is built into. For example,
you probably want to do something like the following:
<blockquote>
<code>% setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH</code></blockquote>
</li>
<li>When all this is done, hopefully all you'll need to do is type:
<blockquote>
<code>% make</code></blockquote>
at the ACE_ROOT directory. This will build the ACE
library, tests, the examples, and the sample applications.
Building the entire ACE release can take a long time and consume
lots of disk space, however. Therefore, you might consider
cd'ing into the <code>$ACE_ROOT/ace</code> directory and
running <code>make</code> there to build just the ACE library.
As a sanity check, you might also want to build and run the
automated <a href="tests/README">"one-button" tests</a> in
<code>$ACE_ROOT/tests</code>. Finally, if you're also
planning on building <a href="http://www.cs.wustl.edu/%7Eschmidt/TAO.html">TAO</a>, you
should build the <a href="http://www.cs.wustl.edu/%7Eschmidt/PDF/gperf.pdf">gperf</a>
perfect hash function generator application in
<code>$ACE_ROOT/apps/gperf</code>.
</li>
<li>If you've set the INSTALL_PREFIX before building, now run
<blockquote><code>% make install</code></blockquote>
</li>
<li>If you need to regenerate the <code>ace/Svc_Conf_y.cpp</code> file,
you'll need to
get <a href="http://ftp.gnu.org/pub/gnu/bison/">GNU Bison</a>.
However, you should rarely, if ever, need to do this.
</li>
</ol>
<hr align="left" width="50%">
<h2><a name="win32">Building and Installing ACE on Windows</a></h2>
<p>This section contains instructions for building ACE on Microsoft
Windows with a variety of compilers and development environments.</p>
<p>First, if you are upgrading from an older release, the recommended practice
is to start with a clean directory. Unpacking the newer release over an older
one will not clean up any old files, and trying to use the environment's
"Clean" command will probably not account for all existing files.</p>
<p>For using MPC and our perl based test framework we recommend
our windows users to use <a href="http://www.activestate.com/Products/ActivePerl/"> Active
State Perl.</a></p>
<ul>
<li><a href="#msvc">Microsoft Visual Studio</a></li>
<li><a href="#embarcadero">Embarcadero C++Builder</a></li>
<li><a href="#mingw">MinGW</a></li>
<li><a href="#cygwin">Cygwin</a></li>
</ul>
</p><p></p><hr align="left" width="50%"><p>
</p><h3><a name="msvc">Building and Installing ACE on Windows with
Microsoft Visual Studio</a></h3>
<p>ACE contains project files for
Visual Studio 2009 (VC9), and Visual Studio 2010 (VC10).
Visual Studio 2005 supports building for
desktop/server Windows as well as for Windows CE and Windows Mobile. Since
not all users will be interested in the CE/Mobile capability, these platforms
have separate solution and project files from the desktop/server Windows.
Furthermore, VC7.1, VC8, VC9, and 10 use different file formats but the same file
suffixes (<code>.sln</code> and <code>.vcproj</code>). To support both
environments, ACE supplies files with different names for the different
development and target platforms. The platform/name mapping is shown below.
All solution files have a <code>.sln</code> suffix and all project files have
a <code>.vcproj</code> suffix.</p>
<p>
The free Visual C++ 2008 Express Edition will work in place of the traditional
Visual Studio editions. All the other notes in this document
that are for VC8 / VC9 also apply to the express edition. MFC, 64-bit, and
CE/mobile options are not available with the express edition. 64-bit binaries
can be built with the compiler and linker included in the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en">Windows SDK</a>, using nmake as the build system (generate nmake makefiles with mwc.pl -type nmake).</p>
<table border="1" width="400">
<caption><b>Mapping of Platform to Solution/Project File Name</b></caption>
<thead>
<tr valign="top">
<th>Platform</th>
<th>File Name</th>
</tr>
</thead><tbody>
<tr>
<th>VC7.1</th>
<td><i>name</i><code>_vc71</code>
</td>
</tr>
<tr>
<th>VC8 for desktop/server</th>
<td><i>name</i><code>_vc8</code>
</td>
</tr>
<tr>
<th>VC8 for Windows CE/Mobile</th>
<td><i>name</i><code>_WinCE</code>
</td>
</tr>
<tr>
<th>VC9 for desktop/server</th>
<td><i>name</i><code>_vc9</code>
</td>
</tr>
<tr>
<th>VC10 for desktop/server</th>
<td><i>name</i><code>_vc10</code>
</td>
</tr>
</tbody></table>
<p>The VC++ compiler and linker can now be invoked from GNU make just like
most UNIX builds. Follow the instructions in the <a href="#unix_traditional">
ACE/GNU Configuration</a> sections and see the additional information in the
comments of
<a href="include/makeinclude/platform_win32_msvc.GNU">platform_win32_msvc.GNU</a>.
</p>
<p>If you happen to open a VC7.1 file from within VC8, it will offer to convert
the file to the newer format for you. With the stock VC8, do not do this;
Visual Studio will crash while attempting to convert the large
solution and project files to build ACE. Simply refuse the conversion and
open the file with the correct format. Note that Microsoft has fixed this
problem. See
<a href="https://msdn.microsoft.com/visualc/downloads/default.aspx">
https://msdn.microsoft.com/visualc/downloads/default.aspx</a> for information.
</p>
<ol>
<li>Uncompress the ACE distribution into a directory, where it will
create a ACE_wrappers directory containing the distribution. The
ACE_wrappers directory will be referred to as ACE_ROOT in the
following steps -- so ACE_ROOT\ace would be C:\ACE_wrappers\ace if
you uncompressed into the root directory.<br>
<br>
</li><li>Create a file called <code>config.h</code> in the ACE_ROOT\ace
directory that contains: <br>
<br>
<code>#include "ace/config-win32.h"</code><br>
<br>
</li><li>The static, DLL and MFC library builds are kept in
different workspaces. Files with names *_Static contain project
files for static builds. Workspaces for static and DLL builds will be
available through the stock release at DOC group's website. The
workspaces for MFC are not available and have to be generated using
MPC. Please see <a href="MPC/docs/README">MPC's README</a> for
details.<br><br>
</li><li>Now load the solution file for ACE (ACE_ROOT/ACE.sln).<br>
<br>
</li><li>Make sure you are building the configuration (i.e, Debug/Release)
the one you'll use (for example, the debug tests need the debug
version of ACE, and so on). All these different configurations are
provided for your convenience. You can either adopt the scheme to
build your applications with different configurations, or use
<code>ace/config.h</code> to tweak with the default settings on
NT.<br> <strong>Note:</strong> If you use the dynamic libraries,
make sure you include ACE_ROOT\lib in your PATH whenever you run
programs that uses ACE. Otherwise you may experience problems
finding ace.dll or aced.dll.<br>
<br>
</li><li>To use ACE with MFC libraries, also add the following to
your <code>config.h</code> file. Notice that if you want to
spawn a new thread with CWinThread, make sure you spawn the
thread with THR_USE_AFX flag set.<br>
<br>
<code>#define ACE_HAS_MFC 1</code><br>
<br>
By default, all of the ACE projects use the DLL versions of the
MSVC run-time libraries. You can still choose use the static (LIB)
versions of ACE libraries regardless of run-time libraries. The
reason we chose to link only the dynamic run-time library is that
almost every NT box has these library installed and to save disk
space. If you prefer to link MFC as a static library into ACE, you
can do this by defining <code>ACE_USES_STATIC_MFC</code> in your
<code>config.h</code> file. However, if you would like to link
everything (including the MSVC run-time libraries) statically,
you'll need to modify the project files in ACE yourself.<p>
</p></li><li>Static version of ACE libraries are built with
<code>ACE_AS_STATIC_LIBS</code><br> defined. This macro should
also be used in application projects that link to static ACE
libraries<br>
<br>
Optionally you can also add the line <br>
<br>
<code>#define ACE_NO_INLINE</code><br>
<br>
before the #include statement in ACE_ROOT\ace\config.h to disable
inline function and reduce the size of static libraries (and your
executables.)<br>
<br>
</li><li>ACE DLL and LIB naming scheme:<br>
<br>
We use the following rules to name the DLL and LIB files in ACE
when using MSVC.<br>
<br>
"Library/DLL name" + (Is static library ? "s" :
"") + (Is Debugging enable ? "d" : "")
+ {".dll"|".lib"}<br>
<br>
</li></ol>
<p>More information for ACE/TAO on MSVC can be found
<a href="docs/msvc_notes.txt">here</a>. The doxygen version of this
document is available under Related Topics in the ACE Library.</p>
<b>ACE TESTS</b><p>
The tests are located in ACE_ROOT\tests. There is also a solution in
that directory to build all the tests (tests.sln)</p><p>
Once you build all the tests (Batch Build works well for this), you
can run perl script <code>run_test.pl</code> in the
<code>tests</code> directory to try all the tests.</p><p>
<a name="win32nonic">
<b> BUILDING ACE ON A WIN32 MACHINE THAT LACKS A NETWORK CARD </b></a></p><p>
<a name="win32nonic">You may want to run ACE on a non-networked machine. To do so, you must
install TCP/IP and configure it to ignore the absence of a network
card. This is one method:
</a></p><ol>
<a name="win32nonic"> <li>Run Control Panel
</li><li>Choose Network from Control Panel
</li><li>Add Adapter: MS Loopback Adapter
</li><li>Configure MS Loopback Adapter with 802.3 (default)
</li><li>Add Protocol: TCP/IP Protocol
</li><li>Configure TCP/IP Protocol with a valid IP address and subnet mask.
Leave everything else at the default settings.
</li><li>Add Service: Workstation
</li><li>Exit and Restart System
</li><li>Run Control Panel again
</li><li>Choose Services from Control Panel
</li><li>The following services are not necessary and may
be set to Disabled Startup: <br>
Alerter<br>
Computer Browser<br>
Net logon<br>
Messanger<br>
</li><li>Choose Network from Control Panel
</li><li>Confirm the following setup. This is all you need to run ACE:<br>
Installed Software:<br>
Computer Browser<br>
MS Loopback Adapter Driver<br>
TCP/IP Protocol<br>
Workstation<br>
Installed Adapter Cards:<br>
MS Loopback Adapter<p>
</p></li></a></ol>
<hr align="left" width="50%"><p> </p>
<h3><a name="embarcadero">Building and Installing ACE on Windows with Embarcadero C++</a></h3>
If you are building for a machine without a network card, you may want
to check <a href="#win32nonic">here</a> first. <p>
</p><ol>
<li>Uncompress the ACE distribution into a directory, where it will
create an
ACE_wrappers directory containing the source. The ACE_wrappers
directory will be referred to as ACE_ROOT in the following steps -- so
ACE_ROOT\ace would be C:\ACE_wrappers\ace if you uncompressed into the
root directory.<br>
<br>
</li><li>Create a file called <code>config.h</code> in the ACE_ROOT\ace
directory that contains: <br>
<br>
<code>#include "ace/config-win32.h"</code><br>
<br>
</li><li>Open a RAD Studio Command Prompt.<br>
<br>
</li><li>Set the ACE_ROOT environment variable to point to the ACE_wrappers
directory. For example:<br>
<br>
<code>set ACE_ROOT=C:\ACE_wrappers</code><br>
<br>
</li><li>Add ACE_wrappers\lib and ACE_wrappers\bin to the PATH environment variable:<br>
<br>
<code>set PATH=%ACE_ROOT%\lib;%ACE_ROOT%\bin;%PATH%</code><br>
<br>
</li><li>Change to the ACE_ROOT\ace directory.<br>
<br>
<code>cd %ACE_ROOT%\ace</code><br>
<br>
</li><li>Generate the bmake makefiles using <a href="#MPC">MPC</a>. Use the <code>bmake</code> project type for C++ Builder:<br>
<br>
<code>%ACE_ROOT%\bin\mwc.pl -type bmake</code><br>
<br>
</li><li>You can build several different versions of ACE by setting the following optional environment
variables before you run make:<br>
<br>
Set the environment variable below to build a debug version of ACE<br>
<code>set DEBUG=1</code><br>
<br>
Set the environment variable below to build a unicode version of ACE<br>
<code>set UNICODE=1</code><br>
<br>
Set the environment variable below to build a version of ACE with
Codeguard support. Should only be used when DEBUG is also set<br>
<code>set CODEGUARD=1</code><br>
<br>
Set the environment variable below to build a version of ACE optimized
for a certain CPU. For this there are special compiler flags
(-3/-4/-5/-6), see the Embarcadero help for more info.<br>
<code>set CPU_FLAG=-6</code><br>
<br>
You can then start the build with the command
<br><code>make -f Makefile.bmak all</code><br>
<br>
You may also enable the options by passing them as command line options to make, for example:<br>
<code>make -f Makefile.bmak -DDEBUG all</code><br>
<br>
</li><li>Build ACE by doing:<br>
<br>
<code>make -f Makefile.bmak all</code><br>
<br>
</li></ol>
<p>
Note that when you run <code>make</code> in a sub directory you give <code>make -f Makefile.bmak all</code>. The <code>all</code> is needed to make sure the complete project is build.<p>
The C++ Builder port has been done by Jody Hagins, <a href="mailto:[email protected]">Christopher Kohlhoff</a> and <a href="mailto:[email protected]">Johnny Willemsen</a>. </p><p>
<b>ACE TESTS</b></p><p>
Before you can build the tests you need to build the protocols directory.
Change the directory to ACE_ROOT\protocols and start: </p><p>
</p><blockquote><code>
%ACE_ROOT%\bin\mwc.pl -type bmake<br>
make -f Makefile.bmak all
</code></blockquote><p>
The tests are located in ACE_ROOT\tests, change to this directory.
You build then the tests with the following commands:</p><p>
</p><blockquote><code>
%ACE_ROOT%\bin\mwc.pl -type bmake<br>
make -f Makefile.bmak all
</code></blockquote><p>
Once you build all the tests, you can run the automated test script using:</p><p>
</p><blockquote><code>perl run_test.pl</code></blockquote><p> in the
<code>tests</code> directory to try all the tests. You need to make
sure the ACE bin and lib directory (in this case
<code>%ACE_ROOT%\bin</code> and <code>%ACE_ROOT%\lib</code>)
are on the path before you try to run the tests. If your executables are
compiled into a subdirectory, add <code>-ExeSubDir subdirname</code> to the
command.</p><p>
<p></p><hr align="left" width="50%"><p>
</p><h3><a name="mingw">Building and Installing ACE on Win32 with MinGW/ MSYS</a></h3>
<p>
If you are building for a machine without a network card, you may want
to check <a href="#win32nonic">here</a> first.
</p><p>
Building and installing ACE on <a href="http://www.mingw.org/">MinGW</a>
uses a mix of a <a href="#unix">UNIX</a> building process and
<a href="#win32">Win32</a> configuration files.
Also, as MinGW uses GNU g++, you may want to take
a look at the <a href="#g++">Compiling ACE with GNU g++</a> section.
</p><p>
You will need the MinGW build tools and libraries, downloable from
<a href="http://www.mingw.org/"><tt>http://www.mingw.org</tt></a>.
<br>
For our build we require the packages
<b><tt>MinGW</tt></b> and <b><tt>MSYS</tt></b>.
</p><ol>
<li> Install the MinGW tools (including the MinGW Development toolkit) into a common directory, say c:/mingw.
<br><br>
</li><li> Install the MSYS tools into a common directory, say c:/msys.
<br><br>
</li><li> Open a MSYS shell. Set your <tt>PATH</tt> environment variable so
your MinGW's <tt>bin</tt> directory is first:
<blockquote><code></code><pre> % export PATH=/c/mingw/bin:$PATH
</pre></blockquote>
</li><li> Add an <tt>ACE_ROOT</tt> environment variable pointing to the
root of your ACE wrappers source tree:
<blockquote><code></code><pre> % export ACE_ROOT=/c/work/mingw/ACE_wrappers
</pre></blockquote>
From now on, we will refer to the root directory of the ACE
source tree as <tt>$ACE_ROOT</tt>.
<br><br>
</li><li> Create a file called <tt>config.h</tt> in the
<tt>$ACE_ROOT/ace</tt> directory that contains:
<blockquote><code></code><pre> #include "ace/config-win32.h"
</pre></blockquote>
</li><li> Create a file called <tt>platform_macros.GNU</tt> in the
<tt>$ACE_ROOT/include/makeinclude</tt> directory containing:
<blockquote><code></code><pre> include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
</pre></blockquote>
In the above text, don't replace <tt>$(ACE_ROOT)</tt> with the
actual directory, GNU make will take the value from the
environment variable you defined previously.
<p>
If you lack Winsock 2, add the line
</p><blockquote><code></code><pre> winsock2 = 0
</pre></blockquote>
before the previous one.
<br><br>
<p>
If you want to install ACE (using "make install") and want all the <tt>.pc</tt> files generated,
set the installation prefix in platform_macros.GNU.
</p><blockquote><code></code><pre> INSTALL_PREFIX=/c/ACE
</pre></blockquote>
Headers will be installed to $INSTALL_PREFIX/include, documentation and
build system files to $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. With INSTALL_PREFIX set, RPATH will be enabled.
To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already
a system-known location for shared libraries), set the make macro
install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
<br><br>
</li><li> In the MSYS shell, change to the $ACE_ROOT/ace directory and
run make:
<blockquote><code></code><pre> % cd $ACE_ROOT/ace
% make
</pre></blockquote>
<p>
This should create <tt>libACE.dll</tt> (the Win32 shared library) and
<tt>libACE.dll.a</tt> (the Win32 import library for the DLL).
Note that the name for the ACE DLL follows the MinGW convention, which itself
resembles UNIX.
</p><p>
If you want static libs also, you may run:
</p><blockquote><code></code><pre> % make static_libs_only=1
</pre></blockquote>
</li><li> Run make install:
<blockquote><code></code><pre> % make install
</pre></blockquote>
<p>
This should create <tt>ACE.pc</tt> to use with pkg-config.
</p>
</li><li> <a name="mingwrunpath">
The same rules for Win32 search of DLLs apply for MinGW. If you
want to run some ACE programs from the MSYS shell, you may
need to add the directory for <tt>libACE.dll</tt> to your PATH:
</a><blockquote><code></code><pre><a name="mingwrunpath"> % export PATH=/c/work/mingw/ACE_wrappers/ace:$PATH
</a></pre></blockquote>
</li></ol>
<a name="mingwrunpath"><b>ACE TESTS</b></a><p>
<a name="mingwrunpath">The tests are located in <tt>$ACE_ROOT/tests</tt>.
After building the library, you can change to that directory and run
make:
</a></p><blockquote><code></code><pre><a name="mingwrunpath"> % cd $ACE_ROOT/tests
% make
</a></pre></blockquote>
<p>
<a name="mingwrunpath">Once you build all the tests, you can run
<code>run_tests.pl</code> in the
<code>tests</code> directory to try all the tests:
</a></p><blockquote><code></code><pre><a name="mingwrunpath"> % perl run_test.pl
</a></pre></blockquote>
<p>
<a name="mingwrunpath">If you are using ACE as a DLL, you will need to modify your PATH
variable as explained </a><a href="#mingwrunpath">above</a>.
</p><p>
You may want to check <tt>$ACE_ROOT/tests/README</tt> for the status
of the various tests on MinGW and the different Windows flavors.
</p><p></p><hr align="left" width="50%"><p>
</p><h3><a name="cygwin">Building and Installing ACE on Win32 with Cygwin</a></h3>
<p>
If you are building for a machine without a network card, you may want
to check <a href="#win32nonic">here</a> first.
</p><p>
Building and installing ACE on <a href="http://www.cygwin.com/">Cygwin</a>
uses the <a href="#unix">UNIX</a> building process.
Also, as Cygwin uses GNU g++, you may want to take
a look at the <a href="#g++">Compiling ACE with GNU g++</a> section.
</p><p>
You will need the Cygwin build tools and libraries, downloable from
<a href="http://www.cygwin.com/"><tt>http://www.cygwin.com</tt></a>.
For our build we require the following packages besides the packages the
setup selects by default:
<a name="cygwinpacks">
</a></p><blockquote>
<a name="cygwinpacks"><b><tt>gcc (version 3.3.3), cygserver, make, perl, binutils</tt></b>.
</a></blockquote>
<ol>
<a name="cygwinpacks"> <li> Install Cygwin (this can be easy downloading and running
<a href="http://cygwin.com/setup.exe"><tt>setup.exe</tt></a>
from the Cygwin site). For working with ACE we recommend
to select <code>DOS</code> as default text file type.
<br><br>
<li> Open a Cygwin shell. Set your <tt>PATH</tt> environment variable so
your Cygwin <tt>bin</tt> directory is first:
<blockquote><code></code><pre> % export PATH=//c/cygwin/bin:$PATH
</pre></blockquote>
or
<blockquote><code></code><pre> % export PATH=/cygdrive/c/cygwin/bin:$PATH
</pre></blockquote>
<p>
Note Cygwin uses ``<tt>/</tt>'' as directory separator,
and ``<tt>//X</tt>'' as a notation for Win32 drive <tt>X</tt>.
Note also that you <em>can't</em> use ``<tt>c:/cygwin/bin</tt>''
because, for Cygwin,
``<tt>:</tt>'' is path separator character, as in UNIX.
<br><br>
</p></li><li> Add an <tt>ACE_ROOT</tt> environment variable pointing to the
root of your ACE wrappers source tree:
<blockquote><code></code><pre> % export ACE_ROOT=c:/work/cygwin/ACE_wrappers
</pre></blockquote>
<p>
Note here you <em>can't</em> use the ``<tt>//X</tt>'' Cygwin
notation as this is seen by Cygwin's compiler and it doesn't
support that (it <em>does</em> support ``<tt>/</tt>'' as directory
separator however).
</p><p>
From now on, we will refer to the root directory of the ACE
source tree as <tt>$ACE_ROOT</tt>.
<br><br>
</p></li><li> Create a file called <tt>config.h</tt> in the
<tt>$ACE_ROOT/ace</tt> directory that contains:
<blockquote><code></code><pre> #include "ace/config-cygwin32.h"
</pre></blockquote>
</li><li> Create a file called <tt>platform_macros.GNU</tt> in the
<tt>$ACE_ROOT/include/makeinclude</tt> directory containing:
<blockquote><code></code><pre> include $(ACE_ROOT)/include/makeinclude/platform_cygwin32.GNU
</pre></blockquote>
In the above text, don't replace <tt>$(ACE_ROOT)</tt> with the
actual directory, GNU make will take the value from the
environment variable you defined previously.
</li><li> On the Cygwin shell, change to the $ACE_ROOT/ace directory and
run make:
<blockquote><code></code><pre> % cd $ACE_ROOT/ace
% make
</pre></blockquote>
<p>
This should create <tt>libACE.dll</tt> (the Win32 shared library) and
<tt>libACE.dll.a</tt> (the Win32 import library for the DLL).
Note the name for the ACE DLL on Cygwin follows the UNIX convention.
<br><br>
</p><p>
If you want static libs also, you may run:
</p><blockquote><code></code><pre> % make static_libs_only=1
</pre></blockquote>
</li><li> <a name="cygwinrunpath">
The same rules for Win32 search of DLLs apply for Cygwin. If you
want to run some ACE programs from the Cygwin shell, you may
need to add the directory for <tt>libACE.dll</tt> to your PATH:
</a><blockquote><code></code><pre><a name="cygwinrunpath"> # export PATH=//c/work/cygwin/ACE_wrappers/ace:$PATH
</a></pre></blockquote>
<a name="cygwinrunpath"> If you are using MPC-generated Makefiles, then the DLLs have been
placed in the lib directory instead of ace and thus your PATH
addition would need to look like this:
</a><blockquote><code></code><pre><a name="cygwinrunpath"> # export PATH=//c/work/mingw/ACE_wrappers/lib:$PATH
</a></pre></blockquote>
</li></ol>
<a name="cygwinrunpath"><b>ACE TESTS</b></a><p>
<a name="cygwinrunpath">The tests are located in <tt>$ACE_ROOT/tests</tt>.