Topic: [SOLVED] Unable to build with wolfssl included in solution

I have included wolfssl in my build according to the instruction manual. I mean I added #include  <wolfssl.ssl.h>.
The build log shows the error:

in file included from ./wolfssl/wolfcrypt/types.h:28:0
from ./wolfssl/internal.h:28
from wolfsslclient.c:30
./wolfssl/wolfcrypt/wc_port.h:105:9: error unknown type name 'pthread_mutex_t'

I can't find a definition for this type  in wolfssl-3.9.8
Can anybody shed some light on this problem so that I can build my program?

Thank you

Share

2 (edited by Kaleb J. Himes 2016-11-10 13:57:35)

Re: [SOLVED] Unable to build with wolfssl included in solution

Hi will,

pthreads or POSIX threads are provided in BSD library (Unix / Linux). How did you build the library and are you on a Unix/Linux system or windows?

UNIX/LINUX:
If you are on Unix/Linux please also include <wolfssl/options.h> so you get the same settings as wolfSSL was built with.
If that doesn't resolve the issue then please got to wolfssl directory and re-run ./configure <your settings> && make check && make install (or sudo make install if using default install location).

WINDOWS:
If you are on windows you would need to include both "user_settings.h" (or if it cannot locate by default "IDE/WIN/user_settings.h") and <wolfssl/wolfcrypt/settings.h> in your project.


Kind Regards,

Kaleb

Re: [SOLVED] Unable to build with wolfssl included in solution

Hi Kaleb:

I am building on a Widows platform. I found the by including #define SINGLE_THREADED in  settings.h  the problem went away. I will include  user_settings in my builds. Thanks for your advice.

Kind regards,

Will

Share