I'm using Eclipse with msys - MinGW under Windows to write a C socket application. When I use some of the winsock2 functions, the linker is complaining. For example:
undefined reference to `WSAStartup@8'
undefined reference to `socket@12'
All the undefined references contain @x so I suspect the names are getting mangled
I'm letting Eclipse do the build with no make file. Here's the compiler command line:
-O0 -g3 -Wall -c -fmessage-length=0
There are no c++ files involved so I'm surprised this is an issue.
Is there a gcc option that allows the linker to deal with mangling?
How can I get functions in winsock2 to build?
(note, this is the winsock2 provided by MinGW not Window's)