> And I use both gcc and clang with command “cc -g -Wall
-I../../include -lcrypto aesgcm.c" to compile the source code. Long
version: Note that the linker processes its libraries from left to
right, e.g. if you have an object file object.o and to libraries
liba.a and libb.a, then "cc object.o -la -lb" will first collect all
unresolved symbols in the object files, then it will resolve whatever
it can resolve with the files in liba.a, possibly adding new
unresolved symbols and finally it will try to resolve the remaining
symbols with libb.a. If you do "cc object.o -lb -la", it will again
start with the symbols from object.o, resolve what it can against
libb.a, then resolve the reamaining stuff against liba.a and if it
adds any symbol from liba.a that needs something from libb.a you get
an error. If you do "cc -lb -la object.o", it will start with no
symbols, add whatever it needs to resolve the symbols from libb.a
(i.e. nothing), then adds whatever it needs from liba.a (i.e.
nothing), then add object.o and complain about everything that remains
unresolved. In short: try "cc ... aesgcm.c -lcrypto", that should
work. Regards, Stefan
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev