[Lazarus] Newbie, porting class to FPC but get procedure assignment error

Bo Berglund bo.berglund at gmail.com
Sun Jun 21 22:35:06 CEST 2015


On Sun, 21 Jun 2015 19:43:10 +0300, patspiper <patspiper at gmail.com>
wrote:

>Add the following options to the objconv command line:
>-nr:GetVersion:_$dll$kernel32$GetVersion
>-nr:GetLastError:_$dll$kernel32$GetLastError
>-nr:WriteFile:_$dll$kernel32$WriteFile
>-nr:ReadFile:_$dll$kernel32$ReadFile
>-nr:DeviceIoControl:_$dll$kernel32$DeviceIoControl
>-nr:CloseHandle:_$dll$kernel32$CloseHandle
>-nr:GetTickCount:_$dll$kernel32$GetTickCount
>-nr:GetPrivateProfileIntA:_$dll$kernel32$GetPrivateProfileIntA
>-nr:GetPrivateProfileStringA:_$dll$kernel32$GetPrivateProfileStringA
>-nr:CreateFileA:_$dll$kernel32$CreateFileA
I did the above

>You might have to add to the project's linker options (-k): -lkernel32
Did not do this.

>If Lazarus can't locate it, search for libkernel32.a and put it in the 
>project folder to test (you can use the linker option -L to specify the 
>libkernel32.a folder).
Did not have to do this either

>Test and let us know what happens :)

I added the -nr lines to my parameters file and re-ran the conversion.
Then moved the resulting coff file to the project dir and compiled:
Message pane shows:

Compile Project, Target: DongleTest.exe: Success

Seems like my dongle module is now compiled without errors! :)
Next task is for me to add the calls to the methods of the object to
check if it will actually be able to read the dongle correctly.
Something for Monday.

Thanks a bunch for this immensly valuable help!


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list