Content originally posted in LPCWare by activestealth on Sat Sep 28 07:53:43 MST 2013
Hi all,
I tried to use pthread in CodeRed but it appears that it could work; but I havent had full success yet.
Attempts:
1. Selected Newlib for GCC C Compiler
2. Downloaded Pthread Win32
3. GCC C Compiler: a) Directory -> Included the path for Pthread Win32 header files
b) Misc -> -pthread
4. GCC C Linker: a) Library -> Included pthreadGC1 and pthreadGCE1
b) Library Search Path -> Included the path for Pthread Win32 lib files
I was initially working on lpcxpresso v3 IDE. It was able to BUILD successfully. However, when I started pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER and compiled again; this time the console popped out: "GNU Compiler needs to be updated"
Next, I switched over to lpcxpresso v6 IDE (hopefully GNU Compiler is more up-to-date). Did the same 4 steps. This time when I compile, they didn't show me "GNU Compiler needs to be updated". Instead, I have this error message:
arm-none-eabi-gcc.exe: error: unrecognized option '-pthread'
Thanks guys for helping.