troubleshooting Question

Demangle names in C

Avatar of JohnSantaFe
JohnSantaFe asked on
6 Comments1 Solution834 ViewsLast Modified:
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)
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros