Creating DLLs by using lazarus ?! lazarus / 13-General ---------------------------------------------------------------------- oern · 2006-06-26 11:45 Hi, want want to create a DLL here is my code: Code: [Select]library Project1; {$mode objfpc}{$H+} uses   Classes,   SysUtils   { add your units here };   var   path: string; begin   path:= extractfilepath(paramstr(0)); end.     But when i try to compile this lazarus say: Error while linking But WHY it is very very simple dll, isn't it, it should work. thx, oern ---------------------------------------------------------------------- felipemdc · 2006-06-26 13:31 Works here, on windows xp. What Operating system and Lazarus version are you using? ---------------------------------------------------------------------- CCRDude · 2006-06-26 15:30 I had a similar problem yesterday (only on libraries - tried my first WinCE library yesterday, that's when I first noticed it). I had to press Ctrl+F9 twice. The first time I got a linker problem, the second time it worked. Today it's a bit different: C:\path\to\some\unit\unitname.pas(1,1) Fatal: Compilation aborted, but again it works the second time (oh, and only Hints, no errors or warnings, before that line, and reappears only after changes - once it compiled, it'll compile again and again until the next change). This is with a daily and files from subversion that are a week old though, so I thought I'ld just install newer stuff before reporting something. Hmmm... ok, I'll install the newest version now to be able to help here ---------------------------------------------------------------------- felipemdc · 2006-06-26 16:48 So the problem is probably caused by the unstable 2.1.x compiler. In case the bug isn´t fixed on recent snapshots, send a bug report to Free Pascal. Also, people not developing for Windows CE should probably use 2.0.2 stable compiler. ---------------------------------------------------------------------- oern · 2006-06-26 17:03 i use winxp sp2 and lazarus 0.9.10 beta. but i want to know wether it is a ide or compilier problem ? ---------------------------------------------------------------------- CCRDude · 2006-06-26 17:12 Have you tried to build again directly afterwards? And have you tried a newer version? 0.9.16/17 is the most current one ---------------------------------------------------------------------- felipemdc · 2006-06-26 23:07 Yes, 0.9.10 is very old. Please use 0.9.16 You can download lazarus here: http://sourceforge.net/project/showfiles.php?group_id=89339 ---------------------------------------------------------------------- oern · 2006-06-27 08:49 I downloaded the new Version. Now I can compile the DLL once, but then there comes the message "can't open file project1.dll" but it goes ---------------------------------------------------------------------- felipemdc · 2006-06-27 10:53 Yes, of course. You can´t run a dll. Try "Build All" instead of "Run" ---------------------------------------------------------------------- oern · 2006-06-27 12:32 Oh, i remember Ctrl + F9, like Delphi