Problems with socket()
Александр Домо
domo at ...62...
Tue Mar 15 09:04:23 CET 2011
> 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.
Yes, I now understand it's part of the lwIP API.
It's just the first time that I got stuck this way.
Using namespaces is probably the best approach.
Thanks for helping!!!
More information about the users
mailing list