News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

zlib dll decoration

Started by czerny, August 19, 2009, 08:20:09 PM

Previous topic - Next topic

czerny

Hallo,

I would like to compile zlib as a dll.

The zlib doc says:

  * The symbols are exported by name, not by ordinal.
  * The exported names are undecorated.
  * The calling convention of functions is "C" (CDECL).

But I can not find a compiler-option for undecorated cdecl.

What is the right switch?

czerny

Vortex

Try to build your project, do you get any error messages? According to the manual, MS VC++ is supported, you should be able to use the library with Pelles C.
Code it... That's all...

czerny

Hmm,

what do you mean with 'use the library'? A precompiled dll?
That's not the problem. I would like to compile it myself.

czerny

TimoVJL

If you make static library, select from project options Calling conv: __cdecl
May the source be with you

czerny

Quote from: timovjl on August 20, 2009, 07:02:02 AM
If you make static library, select from project options Calling conv: __cdecl
I don't understand!
I do not want to make a static lib. I want to make a dll.
__cdecl is clear. But how to get undecorated symbols?

czerny

czerny

Hi,

maybe it is not clear what I want.

There is a compiler-switch /Gm and /Gn for undecorated fastcall and stdcall.
What is the equivalent switch for cdecl?

czerny

Vortex

Hi czerny,

The cdecl convetion does not decorate functions like stdcall. It adds only a leading underscore to the symbols.
Code it... That's all...