View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0018371||FPC||Compiler||public||2011-01-02 22:46||2011-07-23 19:02|
|Reporter||Jeppe Johansen||Assigned To||Florian|
|Fixed in Version||2.6.0|
|Summary||0018371: Interface declaration of external functions break linking on WinCE|
|Description||This bug was prompted by this forum post: http://www.lazarus.freepascal.org/index.php/topic,11638.0.html|
SDL.pas will indeed generate an external reference with name SDL__PUTENV$PCHAR$$LONGINT instead of _putenv as it should if _putenv is declared in the interface too
On Win32 it works as it should
Attached is a very short example that shows the problem(Compiling for wince will generate an undefined reference to SOMEUNIT_TESTEXTERNAL$LONGINT instead of TestExternal)
|Tags||No tags attached.|
|Fixed in Revision||16854|
someunit.pas (230 bytes)
Looks like it's related to line 1770 in psub.pas
I don't know why it shouldn't make a stub though for wince?
||Removed condition around psub.pas:1770 as suggested.|
It's really bad code and is only supported for Delphi compatibility. Normally such definitions should be appear only in the interface of the unit and be made external right away.
Such code is one of the things that can cause recompilation of units that depend on this unit even when it hasn't changed (because the interface crc will change while parsing the implementation section, because the mangled name of that routine changes).
I don't know either why the stub generation was only done on Windows platforms though.
||Well, the stub generation was done even only on part of the windows platforms (win32 yes, wince no).|
|2011-01-02 22:46||Jeppe Johansen||New Issue|
|2011-01-02 22:46||Jeppe Johansen||File Added: someunit.pas|
|2011-01-02 22:55||Jeppe Johansen||Note Added: 0044812|
|2011-01-30 20:18||Florian||Fixed in Revision||=> 16854|
|2011-01-30 20:18||Florian||Status||new => resolved|
|2011-01-30 20:18||Florian||Fixed in Version||=> 2.5.1|
|2011-01-30 20:18||Florian||Resolution||open => fixed|
|2011-01-30 20:18||Florian||Assigned To||=> Florian|
|2011-01-30 20:18||Florian||Note Added: 0045604|
|2011-01-30 20:42||Jonas Maebe||Note Added: 0045609|
|2011-01-30 20:51||Florian||Note Added: 0045613|
|2011-07-23 19:02||Jeppe Johansen||Status||resolved => closed|