diff --git a/Makefile b/Makefile index 9e24b70..d464064 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ CC = gcc CXX = g++ -CFLAGS = -g -O3 -Wall -std=c++0x -LIBS = +CFLAGS = -g -O3 -Wall -std=c++0x -pthread +LIBS = -lpthread LDFLAGS = -g OBJECTS = \ diff --git a/Makefile.Pi.Adafruit b/Makefile.Pi.Adafruit index e929fb6..7e5a9a5 100644 --- a/Makefile.Pi.Adafruit +++ b/Makefile.Pi.Adafruit @@ -2,7 +2,7 @@ # Support for the Adafruit i2c 16 x 2 RGB LCD Pi Plate CC = gcc CXX = g++ -CFLAGS = -g -O3 -Wall -std=c++0x -DHD44780 -DADAFRUIT_DISPLAY -I/usr/local/include +CFLAGS = -g -O3 -Wall -std=c++0x -pthread -DHD44780 -DADAFRUIT_DISPLAY -I/usr/local/include LIBS = -lwiringPi -lwiringPiDev -lpthread LDFLAGS = -g -L/usr/local/lib diff --git a/Makefile.Pi.HD44780 b/Makefile.Pi.HD44780 index 9294ead..e44d606 100644 --- a/Makefile.Pi.HD44780 +++ b/Makefile.Pi.HD44780 @@ -2,7 +2,7 @@ CC = gcc CXX = g++ -CFLAGS = -g -O3 -Wall -std=c++0x -DHD44780 -I/usr/local/include +CFLAGS = -g -O3 -Wall -std=c++0x -pthread -DHD44780 -I/usr/local/include LIBS = -lwiringPi -lwiringPiDev -lpthread LDFLAGS = -g -L/usr/local/lib diff --git a/Makefile.Pi.OLED b/Makefile.Pi.OLED index 95298f7..7af4bed 100644 --- a/Makefile.Pi.OLED +++ b/Makefile.Pi.OLED @@ -2,8 +2,8 @@ CC = gcc CXX = g++ -CFLAGS = -g -O3 -Wall -std=c++0x -DOLED -I/usr/local/include -LIBS = -lArduiPi_OLED +CFLAGS = -g -O3 -Wall -std=c++0x -pthread -DOLED -I/usr/local/include +LIBS = -lArduiPi_OLED -lpthread LDFLAGS = -g -L/usr/local/lib OBJECTS = \ diff --git a/Thread.cpp b/Thread.cpp index 9f43374..b334436 100644 --- a/Thread.cpp +++ b/Thread.cpp @@ -61,6 +61,8 @@ void CThread::sleep(unsigned int ms) #else +#include + CThread::CThread() : m_thread() { diff --git a/Thread.h b/Thread.h index 8a6843f..352d938 100644 --- a/Thread.h +++ b/Thread.h @@ -41,7 +41,7 @@ public: private: #if defined(_WIN32) || defined(_WIN64) - HANDLE m_handle; + HANDLE m_handle; #else pthread_t m_thread; #endif