<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.moz-quote-pre, li.moz-quote-pre, div.moz-quote-pre
{mso-style-name:moz-quote-pre;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>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<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I started with the zip file at:<o:p></o:p></p><p class=MsoNormal><a href="https://github.com/jsuzineau/pascal_o_r_mapping/releases/tag/pas-libusb_convenience_release_2">https://github.com/jsuzineau/pascal_o_r_mapping/releases/tag/pas-libusb_convenience_release_2</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>then I created an lib\i386-win32 subdirectory <o:p></o:p></p><p class=MsoNormal>then from this subdirectory: I:\Programming\pas-libusb_test_dll\src\examples> <o:p></o:p></p><p class=MsoNormal>I used this command line:<o:p></o:p></p><p class=MsoNormal>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<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here is the output:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hint: (11030) Start of reading config file I:\Programming\FPC\3.0.4\bin\i386-win32\fpc.cfg<o:p></o:p></p><p class=MsoNormal>Hint: (11031) End of reading config file I:\Programming\FPC\3.0.4\bin\i386-win32\fpc.cfg<o:p></o:p></p><p class=MsoNormal>Free Pascal Compiler version 3.0.4 [2017/10/06] for i386<o:p></o:p></p><p class=MsoNormal>Copyright (c) 1993-2017 by Florian Klaempfl and others<o:p></o:p></p><p class=MsoNormal>(1002) Target OS: Win32 for i386<o:p></o:p></p><p class=MsoNormal>(3104) Compiling test1library.pas<o:p></o:p></p><p class=MsoNormal>(3104) Compiling I:\Programming\pas-libusb_test_dll\src\libusb.pas<o:p></o:p></p><p class=MsoNormal>I:\Programming\pas-libusb_test_dll\src\libusb.pas(1315,13) Hint: (4035) Mixing signed expressions and longwords gives a 64bit result<o:p></o:p></p><p class=MsoNormal>I:\Programming\pas-libusb_test_dll\src\libusb.pas(1333,13) Hint: (4035) Mixing signed expressions and longwords gives a 64bit result<o:p></o:p></p><p class=MsoNormal>libusb.pas(1355) Error: Invalid DLL libusb-1.0.dll, invalid header size<o:p></o:p></p><p class=MsoNormal>I:\Programming\pas-libusb_test_dll\src\libusb.pas(1351,1) Fatal: (10026) There were 1 errors compiling module, stopping<o:p></o:p></p><p class=MsoNormal>Fatal: (1018) Compilation aborted<o:p></o:p></p><p class=MsoNormal>Error: I:\Programming\FPC\3.0.4\bin\i386-win32\ppc386.exe returned an error exitcode<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>James<o:p></o:p></p><blockquote style='border:none;border-left:solid #729FCF 1.5pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><p class=moz-quote-pre>I verified, test1library can be build with this command line:<o:p></o:p></p><p class=moz-quote-pre>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<o:p></o:p></p><p class=moz-quote-pre>(eventually you need to create subdirectory lib\x86_64-win64 by hand)<o:p></o:p></p></blockquote></div></body></html>