undefined symbol: RAND_seed

Hello! I’m sorry for my primitive english.
I use gwan with csp in C, when gwan start compile all files, the risult is this:
linking: prova.c: /usr/lib/ undefined symbol: RAND_seed

I install client C and the library need. I try to compile with gcc but nothing, in gcc more lots error, for example: undefined reference to ‘g_namaspace’(this is just one).
The file prova.c begins:

#pragma link "/usr/lib/"
#pragma link "aerospike"
#include <aerospike/aerospike.h>
#include <gwan/gwan.h>

Then I try this:

ld /usr/lib/ | grep -i RAND_seed
ld: warning: cannot find entry symbol _start; not setting start adress
/usr/lib/ undefined reference to 'pthread_rwlockattr_init'
 /usr/lib/ undefined reference to 'dlopen'
 /usr/lib/ undefined reference to 'RAND_seed'

The library /usr/lib/ exist

Please help me!

Thank you!!

The external libraries needed by Aerospike requires the following flags for ld line: LDFLAGS = -lssl -lcrypto -lpthread ifneq ($(OS),Darwin) LDFLAGS += -lrt -ldl endif

This is taken from the Makefile used to build all example applications in the C client:

Thank for answer me! in gwan I cant make the file .c is gwan compile onfly…You have some idea? Thank you!

My C not is too good, RAND_seed is ok right now, because I put #pragma link “ssl” and “crypto”. But now new error :frowning: Linking prova.c: undefined symbol: g_n_key this is problem library or .h file? Thank

g_n_key is something that we use in our example, and is declared in the example_utils.c If you are using the same variable, you will want to declare it.

Yes I know, I tryed to connect gwan with aerospike, aerospike is best db but gwan apparently is fast web server(good match).
I used your example in areospike client c (example/query-example/simple/src/main/example.c) to have a connection. Right, my C not is too good but I have big project with aerospike and I do not want to use php(not too fast). Gwan compile onfly, so nothing gcc etc.
I put everything:

#pragma include "/usr/lib/"
#pragma link "aerospike"
#pragma link "ssl"
#pragma link "crypto"
#pragma include "/usr/lib/x86_64-linux-gnu/"
#pragma link "dl"
#pragma link "rt"
#pragma link "nl"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
#include <aerospike/aerospike.h>
#include <aerospike/aerospike_query.h>
#include <aerospike/aerospike_batch.h>
#include <aerospike/aerospike_key.h>
#include <aerospike/as_batch.h>
#include <aerospike/as_error.h>
#include <aerospike/as_integer.h>
#include <aerospike/as_key>
#include <aerospike/as_record.h>
#include <aerospike/as_status.h>
#include <aerospike/as_val.h>
#include <example_utils.h>
#include <gwan/gwan.h>
// Forward Declarations
bool batch_read_cb(const as_batch_read* results, uint32_t n, void* udata);
void cleanup(aerospike* p_as);
bool insert_records(aerospike* p_as);
// BATCH GET Example
main(int argc, char* argv[])

Same problem
I wanna just connect this fantastic DB with C(gwan or better), or maybe is better lua?(for low latency) Thanks for your patience!!

We will try and get an example up.

Thank you! For your help!!!

Please find my answer here. I’ve tried to make it more descriptive and in-detail. Please let me know, if you find any difficulty in it.

Thank you!!! Nothing difficulty, know I understand for connection!!! Thank you Again!!