I junt trying compile the MongoDB C++ driver on Cygwin with the 'scons' command and i getting this follow error:
src/mongo/db/nonce.cpp:48:20: error: ‘srandomdev’ was not declared in this scope
What lib is that?
Thanks.
I junt trying compile the MongoDB C++ driver on Cygwin with the 'scons' command and i getting this follow error:
src/mongo/db/nonce.cpp:48:20: error: ‘srandomdev’ was not declared in this scope
What lib is that?
Thanks.
The srandomdev function is available in stdlib.h on BSD or OSX systems, not on GNU systems like Cygwin or Linux.
It looks like the build script does not recognize the fact that you are running on Cygwin. There are a few options that you can try. The easiest ones are
Change ifdef clause
Without a Windows machine to test this on, it is hard to confirm this will work for you. In src/mongo/platform/random.cpp , edit line 108
to be
Delete the last else clause
Find the line (141 in my version) of src/mongo/platform/random.cpp that looks like
Delete the lines down to the
#endif
clause and then editto simply be