Pelles C forum

Pelles C => General discussions => Topic started by: TimoVJL on May 08, 2009, 12:28:47 PM

Title: Is polib.exe v 6 working correctly
Post by: TimoVJL on May 08, 2009, 12:28:47 PM
Is polib.exe v 6 working correctly ?
If i make library from \PellesC\bin\sqlite3.dll it doesn't have underscore in function names.

EDIT 2012-07-15: missed option /MACHINE:x86
Code: [Select]
polib.exe sqlite3.dll /out:sqlite3.lib /MACHINE:X86
Title: Re: Is polib.exe v 6 working correctly
Post by: Vortex on May 08, 2009, 06:44:35 PM
Hi timovjl,

I can confirm the issue. The functions exported by sqlite3.lib don't have the leading underscores.
Title: Re: Is polib.exe v 6 working correctly
Post by: Stefan Pendl on May 08, 2009, 07:06:14 PM
I think Pelle mentioned something like this in the thread about the v6 RC.

In some cases the exported functions are undecorated automatically.

The decoration for exported symbols has changed a bit, to try and match Microsoft better. Because of this you can get linking errors if not all modules are recompiled.
Title: Re: Is polib.exe v 6 working correctly
Post by: Pelle on May 10, 2009, 12:22:59 PM
I have spent a fair amount of time revising and testing the modified import/export handling. It affects the C compiler, the assembler, the linker, and the library manager; exports can come from module-definition files, executable files, and the /EXPORT option - there are many combinations to test. AFAICT the new approach works, and matches Microsoft better. It does, however, not exactly match the previous behavior.
Title: Re: Is polib.exe v 6 working correctly
Post by: robertz on February 11, 2010, 12:21:54 PM
Hello everyone,

I'm experiencing the same problem. I'm trying to get a .lib of out of SDL.dll (from www.libsdl.org) but the exported functions _don't_ get underscored. I've noticed there is an option in polib to NOT underscore functions, but I DO want them underscored and there is no switch to force that.

Oddly enough, if I create a definition file with the exported names (NOT underscored) and pass it to polib with the /DEF switch, the resultant .lib is correctly underscored.

Thank you very much for your great compiler and the time you spend in it.