Problems with socket()
Christian Helmuth
christian.helmuth at ...1...
Mon Mar 14 20:49:07 CET 2011
Hi Александр,
On Mon, Mar 14, 2011 at 08:31:35PM +0300, Александр Домо wrote:
> I finally got to the root of the problem! In my project source code I
> found a number of functions named "tcp_xxx", and particularly, tcp_init(),
> that came into conflict with the ones in the lwip library. When I renamed
> them, the problem was gone. Now if you could tell me who is right and who
> is wrong in this case? What is the right way of doing this?
Using the lwIP library you kind of sign a contract to not name your
own API functions like exported functions. We did some mix of
incremental link and making function private with objcopy in past
projects, but I explicitly do not recommend such hacks if avoidable in
any way. A clean interface is the best track.
If I am in doubt which symbol names can be used, I investigate the
libraries with 'nm', prefix my C symbols or (at the best) use a C++
namespace for my own API.
Regards
--
Christian Helmuth
Genode Labs
http://www.genode-labs.com/ · http://genode.org/ · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list