Thema: Delphi Treiber Handling

Einzelnen Beitrag anzeigen

Benutzerbild von JamesTKirk
JamesTKirk

Registriert seit: 9. Sep 2004
Ort: München
604 Beiträge
 
FreePascal / Lazarus
 
#24

Re: Treiber Handling

  Alt 30. Dez 2009, 17:36
Zitat von nanix:
Yes that is true but how would it look in lazarus the make file?

in delphi i now use this..

Delphi-Quellcode:
bin\dcc32 -UC:\test1\include -B -CG -JP -$A-,C-,D-,G-,H-,I-,L-,P-,V-,W+,Y- -O+ driver.pas
bin\rmcoff2 driver.obj
bin\link /NOLOGO /ALIGN:32 /BASE:0x10000 /SUBSYSTEM:NATIVE /DRIVER /LIBPATH:C:\test1\lib /ENTRY:DriverEntry ntoskrnl.lib hal.lib win32k.lib ntdll.lib ntutils.lib /out:driver.sys driver.obj
You may try this (it's a suggestion and not tested):

Code:
fpc -FuC:\test1\include -Mdelphi driver.pas
bin\rmcoff2 driver.o
bin\link /NOLOGO /ALIGN:32 /BASE:0x10000 /SUBSYSTEM:NATIVE /DRIVER /LIBPATH:C:\test1\lib /ENTRY:DriverEntry ntoskrnl.lib hal.lib win32k.lib ntdll.lib ntutils.lib /out:driver.sys driver.obj
I don't know what options link needs to link a 64-bit file. Perhaps
Code:
/ALIGN:64
is enough.
For compiling 64-bit code you also need the 64-bit version of FPC. You can then define the target plattform with
Code:
-Pi386
for 32-bit and
Code:
-Px86_64
for 64-bit.

I currently don't know how to define the switches (after -$ in your code) in the command line, so you might need to define these in your code like this (example for H-):
{$H-}
Zitat von nanix:
Does FPC/lazarus compile only for normal x64 becouse there is IA x64 and AMD x64
Currently FPC only supports AMD x86.

Note: IA x64 is something completly different to normal 64-bit found on common processors (including Intel processors). So AMD x86 is normally sufficient!

Regards,
Sven
Sven
[Free Pascal Compiler Entwickler]
this post is printed on 100% recycled electrons
  Mit Zitat antworten Zitat