Name mangling causes link errors ... how disable mangling?
- From: noleander <noleander@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 May 2005 11:18:03 -0700
I need to use a library supplied by someone else: libjpeg.lib. This is a
plain C library. I do not have the source code. I do have the header *.h
files. When I run dumpbin on the libjpeg.lib, it contains symbols (entry
points) like:
jpeg_read_header
I'm trying to link my program with this library. My program is in Visual
C++. The link fails with link-time errors such as:
unable to find function _cdecl_jpeg_read_header(int, char*) [more mangling
stuff]
Apparently, at compile time my compiler is mangling the library function
names (from the library header files) to include the parameter types.
To fix this, I presume, I need to put some instructions into the library's
header files that say "Treat these as normal C functions without mangling".
Any suggestions on how to make the link successful? Thanks in advance for
any help.
neal
.
- Follow-Ups:
- Re: Name mangling causes link errors ... how disable mangling?
- From: William DePalo [MVP VC++]
- Re: Name mangling causes link errors ... how disable mangling?
- Prev by Date: RE: Intellisense in MC++
- Next by Date: Re: Name mangling causes link errors ... how disable mangling?
- Previous by thread: Icon transparency colour
- Next by thread: Re: Name mangling causes link errors ... how disable mangling?
- Index(es):
Relevant Pages
|