Appendices > Compiler Options for Multithreaded Applications
 
Compiler Options for Multithreaded Applications
The following table shows the compiler or compiler/linker options that must be used to build a multithreaded application. Failure to use these options will result in undefined behavior at runtime.
Compiler Options for Multithreaded Applications
Port
Compilation
Link
Macros1
hp32_11_3.73
hp64_11_3.73
-mt
-mt -z
_THREAD_SAFE _REENTRANT
ia64_hpux11_6.17
ia64-32_hpux11_6.17
-mt
-mt -z
_THREAD_SAFE _REENTRANT
power32_aix6.1_10.1
power64_aix6.1_10.1
_THREAD_SAFE
ultrasparc32_10_11
ultrasparc64_10_11
-mt
-mt
_REENTRANT
x64_sles10.0_4.1
x86_sles10.0_4.1
x86_rhel5.0_4.1
x64_rhel5.0_4.1
-pthread
-pthread -lpthread
x86_solaris10_11
x64_solaris10_11
-mt
-mt
_THREAD_SAFE _REENTRANT
x64_.net2010_10.0
x64_.net2012_11.0
x64_.net2013_12.0
x64_.net2015_14.0
x86_.net2010_10.0
x86_.net2012_11.0
x86_.net2013_12.0
x86_.net2015_14.0
/MD
or
/MT
 
 
_MD
or
_MT
 

1 These macros are used to detect a multithreaded compilation. You must not set them when compiling in single-thread mode. All other platforms use the flag ILS_USE_THREADS to indicate a multithreaded compilation.


Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.