View Issue Details

IDProjectCategoryView StatusLast Update
0012241LazarusDebuggerpublic2011-12-01 11:26
ReporterJHAssigned ToMarc Weustink 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.24Product Build 
Target VersionFixed in Version0.9.30 
Summary0012241: Static loading a dll fails when external declaration starts uppercase
DescriptionI have tried it many times. In the following declaration:

function SomeFunction(const SomeParam: SomeType): SomeReturnType; cdecl; external 'Mydll.dll';

At debug time, the application fails to starts and a message saying "external: SIGSEGV" appears. But the compiled exe runs well outside Lazarus. To start the application successfully in Lazarus you need to change 'Mydll.dll' to 'mydll.dll'. No big trouble, I know, only beware with the case of you dll declared name but somebody may have troubles when reusing code from Delphi to Lazarus (my case). Also note that 'mydll.dll' will work even if the file name is Mydll.dll. Only matters the declared dll name in your code, not the file name.
Additional InformationA Lazarus project is included to show the bug. The project imports two functions. If you try to run the project inside Lazarus it will crash. Now try double clicking in the exe file (not included, compile it), the program will run as expected. Now go to the code again, and change 'SomeDLL.dll' to 'somedll.dll', it will run well inside Lazarus this time. The dll is written in c++ (CodeBlocks) and a precompiled version is included and the source code too.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

2008-09-26 18:57

 

lazarus_bug.zip (223,799 bytes)

Martin Friebe

2011-04-28 11:49

manager   ~0047866

I have tested with 0.9.30 (and gdb 7.2 as included by 0.9.30).
I have tested with a dll compiled by fpc.

I can rename the dll as upper/lower/mixed case, the project runs ok in the debugger.

Please test and close if ok.

Issue History

Date Modified Username Field Change
2008-09-26 18:57 JH New Issue
2008-09-26 18:57 JH Status new => assigned
2008-09-26 18:57 JH Assigned To => Marc Weustink
2008-09-26 18:57 JH File Added: lazarus_bug.zip
2008-09-26 18:57 JH Widgetset => Win32
2011-04-28 11:49 Martin Friebe LazTarget => -
2011-04-28 11:49 Martin Friebe Status assigned => resolved
2011-04-28 11:49 Martin Friebe Fixed in Version => 0.9.30
2011-04-28 11:49 Martin Friebe Resolution open => fixed
2011-04-28 11:49 Martin Friebe Note Added: 0047866
2011-12-01 11:26 Marc Weustink Status resolved => closed