[fpc-pascal] USB Human Interface Devices
James Richters
james at productionautomation.net
Tue Aug 6 17:18:03 CEST 2019
I am trying to compile this with a stock installation of FPC 3.0.4 for windows… which does not have 64bit.. it only installs i386-win32 and then there is a cross compiler for x86_64-win64
I started with the zip file at:
https://github.com/jsuzineau/pascal_o_r_mapping/releases/tag/pas-libusb_convenience_release_2
then I created an lib\i386-win32 subdirectory
then from this subdirectory: I:\Programming\pas-libusb_test_dll\src\examples>
I used this command line:
I:\Programming\FPC\3.0.4\bin\i386-win32\fpc.exe -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Filib\i386-win32\ -Fu.. -Fu. -FUlib\i386-win32\ -FE. -otest1library.exe test1library.pas
Here is the output:
Hint: (11030) Start of reading config file I:\Programming\FPC\3.0.4\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file I:\Programming\FPC\3.0.4\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.4 [2017/10/06] for i386
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Win32 for i386
(3104) Compiling test1library.pas
(3104) Compiling I:\Programming\pas-libusb_test_dll\src\libusb.pas
I:\Programming\pas-libusb_test_dll\src\libusb.pas(1315,13) Hint: (4035) Mixing signed expressions and longwords gives a 64bit result
I:\Programming\pas-libusb_test_dll\src\libusb.pas(1333,13) Hint: (4035) Mixing signed expressions and longwords gives a 64bit result
libusb.pas(1355) Error: Invalid DLL libusb-1.0.dll, invalid header size
I:\Programming\pas-libusb_test_dll\src\libusb.pas(1351,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: I:\Programming\FPC\3.0.4\bin\i386-win32\ppc386.exe returned an error exitcode
Any ideas? Is this just from using i386-win32? Maybe the DLL is only for 64bit? Maybe some completely unrelated issue? If 64bit is needed, what’s the best way to install FPC3.0.4 for x86_64-win64? It seems like I tried to do that before and it wasn’t really very easy to try to learn how to compile it.
James
I verified, test1library can be build with this command line:
C:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.exe -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Filib\ x86_64-win64 -Fu.. -Fu. -FUlib\x86_64-win64 -FE. -otest1library.exe test1library.pas
(eventually you need to create subdirectory lib\x86_64-win64 by hand)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190806/c6232af2/attachment.html>
More information about the fpc-pascal
mailing list