Matheus Ledesma wrote:
> With "-ldl" after "-static" argument I receive the following error:
>
> balanca_simula_peso_io_paralela.c:632: warning: 'mseg1' may be used
> uninitialized in this function
>
> /home/generic/CodeSourcery/Sourcery_G++_Lite/bin/../arm-none-linux-gnueabi/libc/lib/libsqlite3.a(sqlite3.o):
>
> In function `unixDlOpen':
> /home/generic/OpenController/garten/teste/sqlite3.c:26401: warning:
> Using 'dlopen' in statically linked applications requires at runtime the
> shared libraries from the glibc version used for linking
Not an error, a warning :) If you check, your app binary was probably
created in your build directory.
Here's my understanding:
I can't speak to whether you really need to, but you are passing
-static. According to the gcc manpage, this means "this prevents
linking with ... shared libraries".
This is a lie. gcc still does a dynamic link to libgcc, which is
assumed to be so widely available that it's a waste to statically
link it. But gcc is nice and warns you that your application is not
completely statically linked.
So you can try running your application on the target platform. If the
proper shared libs exist there, then you're good to go.
If not, you need to statically link libgcc as well at compile time. Do
that by passing -static-libgcc to your compiler.
Disclaimer: I'm not a guru in the area, so ymmv.
Good luck,
Eric
--
Eric A. Smith
The concept is interesting and well-formed, but in order to earn
better than a 'C,' the idea must be feasible.
-- A Yale University management professor in response to Fred Smith's paper
proposing reliable overnight delivery service.
(Smith went on to found Federal Express Corp.)
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users