Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

Undefined Symbols when linking

Last updated on 14 days ago
F
FaroxMember
Posted 15 days ago
Hello
I found a good game to port, it's a Real Time Strategy game..after some changes i have code that compiles...but i have some trouble at linking.
The game uses Socket and after many hours of searching i found all the missing things in
#include <clib/bsdsocket_protos.h>
the game needs :
select()
setsockopt
::getsockname
and many others.

Now code compile fine without errors but at linking...i have:

Quote

There are undefined symbols in 'AROS_debug/ht':
U setsockopt(int, int, int, void*, unsigned int)
U WaitSelect(int, fd_set*, fd_set*, fd_set*, timeval*, unsigned int*)
U getpeername(int, sockaddr*, unsigned int*)
U getsockname(int, sockaddr*, unsigned int*)
U bind(int, sockaddr*, unsigned int)
U recv(int, void*, int, int)
U send(int, void const*, int, int)
U accept(int, sockaddr*, unsigned int*)
U listen(int, int)
U sendto(int, void const*, int, int, sockaddr const*, unsigned int)
U socket(int, int, int)
U connect(int, sockaddr*, unsigned int)
U recvfrom(int, void*, int, int, sockaddr*, unsigned int*)
makefile.aros:97: recipe for target 'AROS_debug/ht' failed
make: *** [AROS_debug/ht] Error 1


Actually i link only with LIBS = -lnet -lSDL
On Linux only SDL is necessary.

Where i can find the missing symbols...in what library?

Thanks
Edited by Farox on 03-07-2024 16:58, 15 days ago
A
Amiwell79Distro Maintainer
Posted 15 days ago
Thank you for your effortSmile
D
deadwoodAROS Dev
Posted 15 days ago
@Farox

If I remember correctly those functions don't come from a link-library, but come from a "header". Essentially in every .c file that uses these functions, you need to


#include <proto/socket.h>


Also, you need to manually open bsdsocket.library in your code - unlike other libraries, this one is not auto-opened. Please see this code for example:

https://github.com/deadwood2/contrib/blob/master/Networking/Apps/wget/src/main.c#L714
Argo, Farox, miker1264
F
FaroxMember
Posted 14 days ago
Thanks i'll take a look. Smile
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Users who participated in discussion: deadwood, Amiwell79, Farox
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 8
Members Online 0

Total Members: 242
Newest Member: JumpingKiwi
Member Polls
Should AROSWorld continue with AROS-Exec files (SMF based)?
Yes44 %
44% [12 Votes]
No26 %
26% [7 Votes]
Not sure30 %
30% [8 Votes]