[ENet-discuss] static linking warning
Nuno Silva
little.coding.fox at gmail.com
Tue Mar 29 07:53:34 PDT 2011
The problem there is that you're statically linking everything instead of
just enet. However, if libenet.a exists but there is no libenet.so, then the
library itself should already be static, so you dont need the -static
switch. Otherwise, I'm sure there's a way to compile libenet.a as a static
library.
On Tue, Mar 29, 2011 at 3:41 PM, ingmar wirths <ingmania at googlemail.com>wrote:
> Hi all,
>
> i'm linking enet statically to my application (with the g++ switch
> -static),
> which gives me the following pesky warnings:
>
> enet-1.3.1/.libs/libenet.a(unix.o): In function `enet_address_get_host':
> /home/ingmar/Desktop/enet-1.3.1/unix.c:137: warning: Using
> 'gethostbyaddr_r' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking
> enet-1.3.1/.libs/libenet.a(unix.o): In function `enet_address_set_host':
> /home/ingmar/Desktop/enet-1.3.1/unix.c:84: warning: Using
> 'gethostbyname_r' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking
>
> This looks to me like it's going to be a problem to distribute my
> application
> in binary form (which i intend to do). Is static linking not recommended?
> I guess i won't have this problem when i throw enet directly into my
> project.
> Is that the recommended way?
>
> I don't want to have any dependencies for my application, that's why i
> don't
> want to link dynamically.
>
> Cheers,
> ingmar
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20110329/5d93fa69/attachment.html>
More information about the ENet-discuss
mailing list