Re:How to write cross-platform code
by brianobush on Friday October 22, 2010 @01:58PM
(#1820685)
-Avoid #ifdefs.
Agreed. If you need, put the ifdef code in a utility/library. e.g., instead of ifdef'ing your code for pthreads and windows threads, build a simple thread library to abstract the two to a common api.
Agreed. If you need, put the ifdef code in a utility/library. e.g., instead of ifdef'ing your code for pthreads and windows threads, build a simple thread library to abstract the two to a common api.