@@ -145,6 +145,9 @@ not been the case with recent releases. Binary compatibility and
145145consequently library file naming has not changed over this time either
146146so it should not cause any problems.
147147
148+ NOTE: Changes to the platform ABI can cause the library ABI to change
149+ and the current version numbering system does not account for this.
150+
148151The fourth is commonly used for the build number, but will be reserved
149152for future use.
150153
@@ -332,16 +335,23 @@ MinGW64 multilib disabled
332335Building with MS Visual Studio (C, VC++ using C++ EH, or Structured EH)
333336-----------------------------------------------------------------------
334337
338+ NOTE: A VS project/solution/whatever file is included as a contributed
339+ work and is not used of maintained in development. All building and
340+ testing is done using makefiles. We use the native make system for each
341+ toolchain, which is 'nmake' in this case.
342+
335343From the source directory run nmake without any arguments to list
336344help information. E.g.
337345
338346$ nmake
339347
340348As examples, as at Release 2.10 the pre-built DLLs and static libraries
341- are built from the following command-lines:
349+ can be built using one of the following command-lines:
342350
343- [Note: "setenv" comes with the SDK. "/2003" is used to override my build
344- system which is Win7 (at the time of writing) for backwards compatibility.]
351+ [Note: "setenv" comes with the SDK which is not required to build the library.
352+ I use it to build and test both 64 and 32 bit versions of the library.
353+ "/2003" is used to override my build system which is Win7 (at the time of
354+ writing) for backwards compatibility.]
345355
346356$ setenv /x64 /2003 /Release
347357$ nmake realclean VC
@@ -358,7 +368,7 @@ $ nmake realclean VC-static
358368$ nmake realclean VCE-static
359369$ nmake realclean VSE-static
360370
361- If you want to differentiate between libraries by their names you can use,
371+ If you want to differentiate or customise library naming you can use,
362372e.g.:
363373
364374$ nmake realclean VC EXTRAVERSION="-w64"
@@ -372,11 +382,6 @@ pthreadVC2-w64.lib
372382To build and test all DLLs and static lib compatibility versions
373383(VC, VCE, VSE):
374384
375- [Note that the EXTRAVERSION="..." option is passed to the tests Makefile
376- when you target "all-tests". If you change to the tests directory and
377- run the tests you will need to repeat the option explicitly to the test
378- "nmake" command-line.]
379-
380385$ setenv /x64 /2003 /release
381386$ nmake all-tests
382387
@@ -386,6 +391,11 @@ running nmake. E.g.:
386391$ cd tests
387392$ nmake VC
388393
394+ Note: the EXTRAVERSION="..." option is passed to the tests Makefile
395+ when you target "all-tests". If you build the library then change to the
396+ tests directory to run the tests you will need to repeat the option
397+ explicitly to the test "nmake" command-line.
398+
389399For failure analysis etc. individual tests can be built
390400and run, e.g:
391401
@@ -395,8 +405,7 @@ $ nmake VC TESTS="foo bar"
395405This builds and runs all prerequisite tests as well as the individual
396406tests listed. Prerequisite tests are defined in tests\runorder.mk.
397407
398- To build and run only those tests listed use, i.e. without the
399- additional prerequistite dependency tests:
408+ To build and run only the tests listed use:
400409
401410$ cd tests
402411$ nmake VC NO_DEPS=1 TESTS="foo bar"
@@ -405,6 +414,9 @@ $ nmake VC NO_DEPS=1 TESTS="foo bar"
405414Building with MinGW
406415-------------------
407416
417+ NOTE: All building and testing is done using makefiles. We use the native
418+ make system for each toolchain, which is 'make' in this case.
419+
408420We have found that Mingw32 builds of the GCE library variants fail when run
409421on 64 bit systems. The GC variants are fine.
410422
@@ -454,17 +466,17 @@ or, with MinGW64 (multilib enabled):
454466$ make all-tests ARCH=-m64
455467$ make all-tests ARCH=-m32
456468
457- Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the
458- tests GNUmakefile when you target "all-tests". If you change to the tests
459- directory and run the tests you will need to repeat those options explicitly
460- to the test "make" command-line.
461-
462469You can run the testsuite by changing to the "tests" directory and
463470running make. E.g.:
464471
465472$ cd tests
466473$ make GC
467474
475+ Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the
476+ tests GNUmakefile when you target "all-tests". If you change to the tests
477+ directory and run the tests you will need to repeat those options explicitly
478+ to the test "make" command-line.
479+
468480For failure analysis etc. individual tests can be built and run, e.g:
469481
470482$ cd tests
@@ -473,8 +485,7 @@ $ make GC TESTS="foo bar"
473485This builds and runs all prerequisite tests as well as the individual
474486tests listed. Prerequisite tests are defined in tests\runorder.mk.
475487
476- To build and run only those tests listed use, i.e. without the additional
477- prerequistite dependency tests:
488+ To build and run only those tests listed use:
478489
479490$ cd tests
480491$ make GC NO_DEPS=1 TESTS="foo bar"
@@ -518,45 +529,27 @@ Building the library under Cygwin
518529Cygwin implements it's own POSIX threads routines and these
519530will be the ones to use if you develop using Cygwin.
520531
532+ Building applications
533+ ---------------------
521534
522- Building applications with GNU compilers
523- ----------------------------------------
524-
525- If you're using pthreadGC2.dll:
526-
527- With the four header files, _ptw32.h, pthreadGC2.dll and libpthreadGC2.a
528- in the same directory as your application myapp.c, you could compile, link
529- and run myapp.c under MinGW as follows:
530-
531- gcc -o myapp.exe myapp.c -I. -L. -lpthreadGC2
532- myapp
533-
534- Or put pthreadGC2.dll in an appropriate directory in your PATH,
535- put libpthreadGC2.a in your system lib directory, and
536- put the four header files in your system include directory,
537- then use:
538-
539- gcc -o myapp.exe myapp.c -lpthreadGC
540- myapp
541-
542-
543- If you're using pthreadGCE2.dll:
544-
545- With the four header files, pthreadGCE2.dll and libpthreadGCE2.a
546- in the same directory as your application myapp.c, you could compile,
547- link and run myapp.c under Mingw32 as follows:
535+ The files you will need for your application build are:
548536
549- gcc -x c++ -o myapp.exe myapp.c -I. -L. -lpthreadGCE2
550- myapp
537+ The four header files:
538+ _ptw32.h
539+ pthread.h
540+ semaphore.h
541+ sched.h
551542
552- Or put pthreadGCE.dll and gcc.dll in an appropriate directory in
553- your PATH, put libpthreadGCE.a in your system lib directory, and
554- put the four header files in your system include directory,
555- then use:
543+ The DLL library files that you built:
544+ pthread*.dll
545+ plus the matching *.lib (MSVS) or *.a file (GNU)
556546
557- gcc -x c++ -o myapp.exe myapp.c -lpthreadGCE
558- myapp
547+ or, the static link library that you built:
548+ pthread*.lib (MSVS) or libpthread*.a (GNU)
559549
550+ Place them in the appropriate directories for your build, which may be the
551+ standard compiler locations or, locations specific to your project (you
552+ might have a separate third-party dependency tree for example).
560553
561554Acknowledgements
562555----------------
0 commit comments