Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-05

FPC 64bit for windows

23 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

James Richters

I am wondering if it's possible to compile my windows console app specifically for 64bit machines running windows? I am currently compiling it as a win32 console application because I cannot figure out how to compile it as a 64bit program. I normally run bin\i386-win32\FP.EXE and use the text based IDE to compile my program. When I try to install 64 bit windows version, I don't have this anymore, is It possible to use the text based IDE to compile 64 bit programs or do I need to learn how to do it from the command line? Any advice is appreciated

James

Reply by email

Graeme Geldenhuys
to James Richters
James Richters wrote
When I try to install 64 bit windows version, I don't have this anymore

The Free Pascal project, for some weird reason, only ships a 64-bit Windows cross-compiler. So you need both the 32-bit and 64-bit installs. I don't know why they do this.

Simply compile your own _full_ 64-bit FPC, by installing a previous or current stable 32-bit release. Download the latest stable release source code. And then build a new 64-bit target compiler and tools.

It might sound complicate, but the process is pretty easy. Here is a batch file I normally use to do this for me.

=========================[ go.bat ]============================ set TARGET=x86_64-win64
set COMPILER=c:\lazarus\fpc\2.6.2\bin\x86_64-win64\fpc.exe set NEWFPC=2.6.4

cd src
make clean

make all FPC=%COMPILER%
rem OPT="-Fl/usr/local/lib"

make install INSTALL_PREFIX=c:\lazarus\fpc\%NEWFPC%\%TARGET% FPC=%COMPILER%

cd ..
==============================================================

Adjust the paths and versions to match your environment.

But again, I don't know why the FPC team doesn't make an official full 64-bit Windows release??

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Unknown author
to Graeme Geldenhuys
Graeme Geldenhuys wrote
But again, I don't know why the FPC team doesn't make an official full 64-bit Windows release??

IIRC, they say it is because 32bit winwhatever stuff will run on 64bit winwhatever stuff and because of that there's no real reason to build 64bit only... kinda makes one wonder what will happen when m$ remove 32bit capability like they have 16bit capability...

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Michael Van Canneyt
to Unknown author
Show quoted text 9 lines
On 05/15/2017 07:41 AM, Graeme Geldenhuys wrote: > But again, I don't know why the FPC team doesn't make an official full 64-bit > Windows release?? IIRC, they say it is because 32bit winwhatever stuff will run on 64bit winwhatever stuff and because of that there's no real reason to build 64bit only... kinda makes one wonder what will happen when m$ remove 32bit capability like they have 16bit capability...

Then we'll simply ship 64-bit executables.

Michael.

Reply by email

James Richters
to Graeme Geldenhuys: The Free Pascal project, for some weird reason, only ships a 64-bit Windows…

I'm not quite following your batch file. I have no 'src' directory, where is that supposed to be?

Here is where I am at:
I have just downloaded your repo at https://github.com/graemeg/freepascal and I have it saved at 'J:\Programming\FreePascal' Is there a better place to download the x86 64bit source?

My existing 32bit freepascal compiler I have been using is installed at 'J:\Programming\FPCWin' I believe it's V3.0.0

What directory do I put 'go.bat'
Where am I setting Install_prefix? Is that where I put the source code or where I want the compiled version to go?

Thanks for the help!

Jim

=========================[ go.bat ]============================ set TARGET=x86_64-win64
set COMPILER=J:\Programming\FPCwin\fpc.exe
set NEWFPC=3.0.2

cd src
make clean

make all FPC=%COMPILER%
rem OPT="-Fl/usr/local/lib"

make install INSTALL_PREFIX=c:\lazarus\fpc\%NEWFPC%\%TARGET% FPC=%COMPILER% cd ..
==============================================================

Earlier message 47 lines
-----Original Message----- From: fpc-pascal On Behalf Of Graeme Geldenhuys Sent: Monday, May 15, 2017 7:41 AM To: Subject: Re: [fpc-pascal] FPC 64bit for windows On 2017-05-15 11:59, James Richters wrote: > When I try to install 64 bit windows > version, I don't have this anymore The Free Pascal project, for some weird reason, only ships a 64-bit Windows cross-compiler. So you need both the 32-bit and 64-bit installs. I don't know why they do this. Simply compile your own _full_ 64-bit FPC, by installing a previous or current stable 32-bit release. Download the latest stable release source code. And then build a new 64-bit target compiler and tools. It might sound complicate, but the process is pretty easy. Here is a batch file I normally use to do this for me. =========================[ go.bat ]============================ set TARGET=x86_64-win64 set COMPILER=c:\lazarus\fpc\2.6.2\bin\x86_64-win64\fpc.exe set NEWFPC=2.6.4 cd src make clean make all FPC=%COMPILER% rem OPT="-Fl/usr/local/lib" make install INSTALL_PREFIX=c:\lazarus\fpc\%NEWFPC%\%TARGET% FPC=%COMPILER% cd .. ============================================================== Adjust the paths and versions to match your environment. But again, I don't know why the FPC team doesn't make an official full 64-bit Windows release?? Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to James Richters
James Richters wrote
I'm not quite following your batch file. I have no 'src' directory, where is that supposed to be?

If you want the FPC 3.0.2 version, then download the official source archive for the 3.0.2 release from FPC's SourceForge page.

Here is where I am at: I have just downloaded your repo at https://github.com/graemeg/freepascal and I have it saved at

That repo only tracks the Trunk (unstable) branch. So if you want the source code of a stable release, download the archive from SourceForge.

'J:\Programming\FreePascal' Is there a better place to download the x86 64bit source?

I normally order my directories as follows:

c:\FPC
\2.6.4\
\src
\i386-win32
\bin
\lib
\share
\x86_64-win64
\bin
\lib
\share
\3.0.2\
\src
\i386-win32
\bin
\lib
\share
\x86_64-win64
\bin
\lib
\share

So a source archive will be unpacked in the correct "src" directory. This setup also allows me to have a single global fpc.cfg file for all FPC versions. The paths in that fpc.cfg file uses FPC's macros to expand to the correct versions.

My Linux and FreeBSD systems have a similar layout.

What directory do I put 'go.bat'

It will go in the c:\fpc\<version>\ directory. But it doesn't really matter, as long as you adjust the paths inside the patch file to match your environment.

Where am I setting Install_prefix?

Is that where I put the source code or where I want the compiled version to go?

That's where the new compiled version will go. So if you use FPC 2.6.4 to build a new 3.0.0 compiler, then the install prefix will translate to the path: c:\fpc\3.0.0\x86_64-win64\

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

James Richters
to Graeme Geldenhuys
If you want the FPC 3.0.2 version, then download the official source archive for the 3.0.2 release from FPC's SourceForge page.

Could you please give me a link to download 3.0.2 source archive? I'm on the FPC sourceforge page but I'm very confused as to what is what.

Earlier message 78 lines
-----Original Message----- From: fpc-pascal On Behalf Of Graeme Geldenhuys Sent: Monday, May 15, 2017 12:18 PM To: Subject: Re: [fpc-pascal] FPC 64bit for windows On 2017-05-15 16:57, James Richters wrote: > I'm not quite following your batch file. I have no 'src' directory, > where is that supposed to be? If you want the FPC 3.0.2 version, then download the official source archive for the 3.0.2 release from FPC's SourceForge page. > Here is where I am at: I have just downloaded your repo at > https://github.com/graemeg/freepascal and I have it saved at That repo only tracks the Trunk (unstable) branch. So if you want the source code of a stable release, download the archive from SourceForge. > 'J:\Programming\FreePascal' Is there a better place to download the > x86 64bit source? I normally order my directories as follows: c:\FPC \2.6.4\ \src \i386-win32 \bin \lib \share \x86_64-win64 \bin \lib \share \3.0.2\ \src \i386-win32 \bin \lib \share \x86_64-win64 \bin \lib \share So a source archive will be unpacked in the correct "src" directory. This setup also allows me to have a single global fpc.cfg file for all FPC versions. The paths in that fpc.cfg file uses FPC's macros to expand to the correct versions. My Linux and FreeBSD systems have a similar layout. > What directory do I put 'go.bat' It will go in the c:\fpc\<version>\ directory. But it doesn't really matter, as long as you adjust the paths inside the patch file to match your environment. Where am I setting Install_prefix? > Is that where I put the source code or where I want the compiled > version to go? That's where the new compiled version will go. So if you use FPC 2.6.4 to build a new 3.0.0 compiler, then the install prefix will translate to the path: c:\fpc\3.0.0\x86_64-win64\ Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to James Richters
James Richters wrote
Could you please give me a link to download 3.0.2 source archive? I'm on the FPC sourceforge page but I'm very confused as to what is what.

All downloads can be found from here:

https://sourceforge.net/projects/freepascal/files/

From there you click "Source" and then "3.0.2". ;)

https://sourceforge.net/projects/freepascal/files/Source/3.0.2/

For Windows you probably want the .zip file so look for:

fpc-3.0.2.source.zip

For Linux/FreeBSD/*nix you probably want the .tar.gz file so look for:

fpc-3.0.2.source.tar.gz

But in actual fact, the FPC compiler will compile either of them without problems. I ofter share a source archive between my Linux and Windows VMs.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Tomas Hajny
to Graeme Geldenhuys
Graeme Geldenhuys wrote 11 lines
On 2017-05-15 18:19, James Richters wrote: > Could you please give me a link to download 3.0.2 source archive? > I'm on the FPC sourceforge page but I'm very confused as to what is > what. All downloads can be found from here: https://sourceforge.net/projects/freepascal/files/ From there you click "Source" and then "3.0.2". ;)

.
.

Or simply start on the Download page of http://www.freepascal.org (that goes to https://www.freepascal.org/download.var) and select from there...

If the confusion stems from fpc-3.0.2.source.* versus fpcbuild-3.0.2.source.* - the latter is for building full releases (installation packages) and contains a superset of the former for this reason. See also https://www.freepascal.org/develop.var for more information about the existing SVN repositories.

Tomas

Reply by email

James Richters
to Graeme Geldenhuys: All downloads can be found from here: https://sourceforge.net/projects/freepascal/files/…

Thank you for pointing me in the right direction. I was trying to go to Windows instead of source, so I was lost

James

Earlier message 39 lines
-----Original Message----- From: fpc-pascal On Behalf Of Graeme Geldenhuys Sent: Monday, May 15, 2017 1:57 PM To: Subject: Re: [fpc-pascal] FPC 64bit for windows On 2017-05-15 18:19, James Richters wrote: > Could you please give me a link to download 3.0.2 source archive? > I'm on the FPC sourceforge page but I'm very confused as to what is > what. All downloads can be found from here: https://sourceforge.net/projects/freepascal/files/ From there you click "Source" and then "3.0.2". ;) https://sourceforge.net/projects/freepascal/files/Source/3.0.2/ For Windows you probably want the .zip file so look for: fpc-3.0.2.source.zip For Linux/FreeBSD/*nix you probably want the .tar.gz file so look for: fpc-3.0.2.source.tar.gz But in actual fact, the FPC compiler will compile either of them without problems. I ofter share a source archive between my Linux and Windows VMs. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

James Richters
to Graeme Geldenhuys: All downloads can be found from here: https://sourceforge.net/projects/freepascal/files/…

I still haven't figured out how to do this. Is there an easier way to generate a 64bit executable for windows than to compile this myself?

I've downloaded fpc-3.0.2.source.zip but I think I'm still not getting the directories right or something. Are there instructions somewhere on how to do this?

When I try to do the "Make Clean" I get
Makefile:29: *** You need the GNU utils package to use this Makefile. Stop.

I think I am missing something somehow.

James

Earlier message 39 lines
-----Original Message----- From: fpc-pascal On Behalf Of Graeme Geldenhuys Sent: Monday, May 15, 2017 1:57 PM To: Subject: Re: [fpc-pascal] FPC 64bit for windows On 2017-05-15 18:19, James Richters wrote: > Could you please give me a link to download 3.0.2 source archive? > I'm on the FPC sourceforge page but I'm very confused as to what is > what. All downloads can be found from here: https://sourceforge.net/projects/freepascal/files/ From there you click "Source" and then "3.0.2". ;) https://sourceforge.net/projects/freepascal/files/Source/3.0.2/ For Windows you probably want the .zip file so look for: fpc-3.0.2.source.zip For Linux/FreeBSD/*nix you probably want the .tar.gz file so look for: fpc-3.0.2.source.tar.gz But in actual fact, the FPC compiler will compile either of them without problems. I ofter share a source archive between my Linux and Windows VMs. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to James Richters
James Richters wrote
Is there an easier way to generate a 64bit executable for windows than to compile this myself?

I can zip up my 64-bit FPC 3.0.2 directory and make it available for _unofficial_ download if that will help. Let me know, and I'll post a link to the download.

Regards,
Graeme

Reply by email

James Richters
to Graeme Geldenhuys

That would be very much appreciated, I don't know why I have such difficulty with this.

James

Earlier message 14 lines
-----Original Message----- From: fpc-pascal On Behalf Of Graeme Geldenhuys Sent: Thursday, May 18, 2017 6:02 PM To: Subject: Re: [fpc-pascal] FPC 64bit for windows On 2017-05-18 22:53, James Richters wrote: > Is there an easier way to generate a 64bit executable for windows than to compile this myself? I can zip up my 64-bit FPC 3.0.2 directory and make it available for _unofficial_ download if that will help. Let me know, and I'll post a link to the download. Regards, Graeme

Reply by email

Nikolay Nikolov
to Graeme Geldenhuys: The Free Pascal project, for some weird reason, only ships a 64-bit Windows…
Graeme Geldenhuys wrote 7 lines
On 2017-05-15 11:59, James Richters wrote: > When I try to install 64 bit windows > version, I don't have this anymore The Free Pascal project, for some weird reason, only ships a 64-bit Windows cross-compiler. So you need both the 32-bit and 64-bit installs. I don't know why they do this.

Is there an _actual_ problem with that, or is it only imaginary? The 32-to-64 crosscompiler works perfectly fine and has no known disadvantages. On the other hand, the 64-bit compiler cannot crosscompile 32-bit fpc, because it doesn't support the 80-bit extended float type, which is only supported by the x87 FPU, but not by SSE. So, basically, if you're a FPC compiler developer and you're using windows as your main platform, the 64-bit native fpc is inferior. And I don't think anyone has a problem running a 32-bit hosted compiler on a 64-bit windows OS - there are simply no known issues with that under any 64-bit windows version that I know of.

Simply compile your own _full_ 64-bit FPC, by installing a previous or current stable 32-bit release. Download the latest stable release source code. And then build a new 64-bit target compiler and tools.

Or, alternatively, you can simply install the 32-bit to 64-bit crosscompiler on top of your already working install and then crosscompile from the commandline with:

ppcrossx64 program.pas

without any need to compile fpc from sources. It won't work from the IDE, though, but compiling your program from the command line, when you want to build a 64-bit .exe shouldn't be hard.

Of course, there's no problem in following Graeme's route and compiling the compiler yourself (and it might be helpful in the long run to learn how to compile the compiler), but installing the already packaged 32-to-64 crosscompiler package might be easier to start with.

Show quoted text 9 lines
It might sound complicate, but the process is pretty easy. Here is a batch file I normally use to do this for me. ... But again, I don't know why the FPC team doesn't make an official full 64-bit Windows release??

Because it is inferior, since it cannot build a 32-bit FPC. Imagine your advice for compiling the 64-bit native compiler, using the 32-bit starting compiler. What would happen if you had to go the other way around? Your advice only works, because the 32-bit compiler can compile both the 32-bit and 64-bit version of FPC. If you were to start with the 64-bit version, it won't be able to compile the 32-bit version (under windows, that is; under linux, it works, because 64-bit linux has abi support for the 80-bit extended x87 fpu type and there we usually ship a native 64-bit compiler). It may not matter for you, but is a huge showstopper for any FPC compiler developer that uses Windows.

Nikolay

Reply by email

James Richters
to Nikolay Nikolov

Thank you for the explanation. I didn't really understand how to use the cross compiler.

I have installed the cross compiler and tried to compile my program with

ppcrossx64 program.pas

but I get
PaStep.pas(3,98) Fatal: Can't find unit smtpsend used by PAStep

Smtpsend is part of synapse... I was going to try to copy the library to the x86_64-win64 folder but then I thought, wait a minute, I will need the 64bit library to get this to work... but it looks to me like Synapse has only support for Win32. So maybe I'm out of luck with a 64bit version if I'm going to use Synapse, unless the cross compiler will take care of this for me? Anyone know about this?

I'm not sure I really need to compile a 64bit version for any reason, it's just I don't plan to ever run the program on a 32bit machine, so I'm thinking if I have a 64bit machine I might as well have a 64bit program as well and thought it might offer a performance advantage.

James

Earlier message 42 lines
-----Original Message----- From: fpc-pascal On Behalf Of Nikolay Nikolov Sent: Thursday, May 18, 2017 7:39 PM To: Subject: Re: [fpc-pascal] FPC 64bit for windows On 05/15/2017 02:41 PM, Graeme Geldenhuys wrote: > On 2017-05-15 11:59, James Richters wrote: >> When I try to install 64 bit windows >> version, I don't have this anymore > > The Free Pascal project, for some weird reason, only ships a 64-bit > Windows cross-compiler. So you need both the 32-bit and 64-bit > installs. I don't know why they do this. Is there an _actual_ problem with that, or is it only imaginary? The 32-to-64 crosscompiler works perfectly fine and has no known disadvantages. On the other hand, the 64-bit compiler cannot crosscompile 32-bit fpc, because it doesn't support the 80-bit extended float type, which is only supported by the x87 FPU, but not by SSE. So, basically, if you're a FPC compiler developer and you're using windows as your main platform, the 64-bit native fpc is inferior. And I don't think anyone has a problem running a 32-bit hosted compiler on a 64-bit windows OS - there are simply no known issues with that under any 64-bit windows version that I know of. > > Simply compile your own _full_ 64-bit FPC, by installing a previous or > current stable 32-bit release. Download the latest stable release > source code. And then build a new 64-bit target compiler and tools. Or, alternatively, you can simply install the 32-bit to 64-bit crosscompiler on top of your already working install and then crosscompile from the commandline with: ppcrossx64 program.pas without any need to compile fpc from sources. It won't work from the IDE, though, but compiling your program from the command line, when you want to build a 64-bit .exe shouldn't be hard. Of course, there's no problem in following Graeme's route and compiling the compiler yourself (and it might be helpful in the long run to learn how to compile the compiler), but installing the already packaged 32-to-64 crosscompiler package might be easier to start with. > > It might sound complicate, but the process is pretty easy. Here is a > batch file I normally use to do this for me. > > > ... > > But again, I don't know why the FPC team doesn't make an official full > 64-bit Windows release?? Because it is inferior, since it cannot build a 32-bit FPC. Imagine your advice for compiling the 64-bit native compiler, using the 32-bit starting compiler. What would happen if you had to go the other way around? Your advice only works, because the 32-bit compiler can compile both the 32-bit and 64-bit version of FPC. If you were to start with the 64-bit version, it won't be able to compile the 32-bit version (under windows, that is; under linux, it works, because 64-bit linux has abi support for the 80-bit extended x87 fpu type and there we usually ship a native 64-bit compiler). It may not matter for you, but is a huge showstopper for any FPC compiler developer that uses Windows. Nikolay

Reply by email

Sven Barth
to James Richters

Am 19.05.2017 02:22 schrieb "James Richters" <

: Thank you for the explanation. I didn't really understand how to use the

cross compiler.

Show quoted text 9 lines
I have installed the cross compiler and tried to compile my program with ppcrossx64 program.pas but I get PaStep.pas(3,98) Fatal: Can't find unit smtpsend used by PAStep Smtpsend is part of synapse... I was going to try to copy the library

to the x86_64-win64 folder but then I thought, wait a minute, I will need the 64bit library to get this to work... but it looks to me like Synapse has only support for Win32. So maybe I'm out of luck with a 64bit version if I'm going to use Synapse, unless the cross compiler will take care of this for me? Anyone know about this?

You'll need to compile synapse from source then using the cross compiler (I doubt that they don't support Win64).

Btw: instead of calling "ppcross64.exe ..." you can also use "fpc -Px86_64 ..."

Regards,
Sven

Reply by email

Graeme Geldenhuys
to Nikolay Nikolov: Is there an _actual_ problem with that, or is it only imaginary? The 32-to-64…
Nikolay Nikolov wrote 6 lines
windows OS - there are simply no known issues with that under any 64-bit windows version that I know of. ....snip... It won't work from the IDE, though, but compiling your program from the command line, when you want to build a 64-bit .exe shouldn't be hard.

So you are contradicting your self a bit. No known problems, and then two paragraphs later... but there is this known problem with the IDE. ;-)

Because it is inferior, since it cannot build a 32-bit FPC.

You don't have to build a 32-bit FPC because an official released installer exists.
So this is no seeing as pretty much everything is moving (or already has moved) to 64-bit, why bother with 32-bit these days. [referring to desktop and server applications - not embedded devices]

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to James Richters: That would be very much appreciated, I don't know why I have such difficulty with this.…
James Richters wrote
That would be very much appreciated,

http://geldenhuys.co.uk/~graemeg/fpc-3.0.2-win64.7z

It's a 53MB download. It includes the 3.0.2 64-bit Windows compiler and source code, as well as the binutils and the go.bat batch file I used to compile the 3.0.2 version.

NOTE:
Not quite ideal, but the fpc.cfg file is referencing the FPC locations as c:\lazarus\fpc\<version>\
So if you unpack this archive to any other location, please adjust the paths in the fpc.cfg file. For some reason the Windows VM I used installed FPC inside the c:\Lazarus directory. Normally I use c:\fpc\ instead.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Lukasz Sokol
to Graeme Geldenhuys: So you are contradicting your self a bit. No known problems, and then two paragraphs…
Graeme Geldenhuys wrote 19 lines
On 2017-05-19 00:38, Nikolay Nikolov wrote: > windows OS - there are simply no known issues with that under any > 64-bit windows version that I know of. ....snip... It won't work > from the IDE, though, but compiling your program from the command > line, when you want to build a 64-bit .exe shouldn't be hard. So you are contradicting your self a bit. No known problems, and then two paragraphs later... but there is this known problem with the IDE. ;-) > Because it is inferior, since it cannot build a 32-bit FPC. You don't have to build a 32-bit FPC because an official released installer exists. So this is no seeing as pretty much everything is moving (or already has moved) to 64-bit, why bother with 32-bit these days. [referring to desktop and server applications - not embedded devices]

Is there a way for native 64bit application to load a 32bit library, that then can talk to a 32bit USB driver ?
(on Windows)

-L.

Regards, Graeme

Reply by email

Sven Barth
to Lukasz Sokol
"Lukasz Sokol" wrote 25 lines
On 19/05/17 11:15, Graeme Geldenhuys wrote: > On 2017-05-19 00:38, Nikolay Nikolov wrote: >> windows OS - there are simply no known issues with that under any >> 64-bit windows version that I know of. ....snip... It won't work >> from the IDE, though, but compiling your program from the command >> line, when you want to build a 64-bit .exe shouldn't be hard. > > So you are contradicting your self a bit. No known problems, and then > two paragraphs later... but there is this known problem with the IDE. > ;-) > > >> Because it is inferior, since it cannot build a 32-bit FPC. > > You don't have to build a 32-bit FPC because an official released > installer exists. So this is no seeing as pretty > much everything is moving (or already has moved) to 64-bit, why > bother with 32-bit these days. [referring to desktop and server > applications - not embedded devices] > Is there a way for native 64bit application to load a 32bit library, that then can talk to a 32bit USB driver ? (on Windows)

Drivers (at least kernel mode drivers) must be 64-bit on 64-bit Windows (and also basically every other system I'm aware of). However it's perfectly possible to talk with a 64-bit driver from a 32-bit application.
And no, you can't load a 32-library from a 64-bit process.

Regards,
Sven

Reply by email

Lukasz Sokol
to Sven Barth
Sven Barth wrote 15 lines
>> You don't have to build a 32-bit FPC because an official >> released installer exists. So this is no >> seeing as pretty much everything is moving (or already has moved) >> to 64-bit, why bother with 32-bit these days. [referring to >> desktop and server applications - not embedded devices] >> > > Is there a way for native 64bit application to load a 32bit > library, that then can talk to a 32bit USB driver ? (on Windows) Drivers (at least kernel mode drivers) must be 64-bit on 64-bit Windows (and also basically every other system I'm aware of). However it's perfectly possible to talk with a 64-bit driver from a 32-bit application. And no, you can't load a 32-library from a 64-bit process.

This one is not a kernel-mode (at least so I think because the same installation succeeds both on 32bit XPSP3, and in recent Win10 64bit)...

(it's the old old Microchip MCHPFUSB driver used e.g. with PIC18F4550, driver version 1.3; it's probably not as much a 'driver' as a way to register the PID and VID with the system, more or less; but the library interfacing it, is 32bit only)

-L.

Show quoted text 9 lines
Regards, Sven _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Sven Barth
to Lukasz Sokol
"Lukasz Sokol" wrote 23 lines
On 19/05/17 13:33, Sven Barth via fpc-pascal wrote: >>> You don't have to build a 32-bit FPC because an official >>> released installer exists. So this is no >>> seeing as pretty much everything is moving (or already has moved) >>> to 64-bit, why bother with 32-bit these days. [referring to >>> desktop and server applications - not embedded devices] >>> >> >> Is there a way for native 64bit application to load a 32bit >> library, that then can talk to a 32bit USB driver ? (on Windows) > > Drivers (at least kernel mode drivers) must be 64-bit on 64-bit > Windows (and also basically every other system I'm aware of). However > it's perfectly possible to talk with a 64-bit driver from a 32-bit > application. And no, you can't load a 32-library from a 64-bit > process. This one is not a kernel-mode (at least so I think because the same installation succeeds both on 32bit XPSP3, and in recent Win10 64bit)... (it's the old old Microchip MCHPFUSB driver used e.g. with PIC18F4550,
driver version 1.3;
it's probably not as much a 'driver' as a way to register the PID and

VID with the system,

more or less; but the library interfacing it, is 32bit only) From what I can see from their site version 1.3 is the first that supports

64-bit and it indeed includes a 64-bit driver (and a 32-bit one as well). Also if I understand that correctly the source and API information to access the driver is provided as well, so you could either compile the library for 64-bit or port it to FPC to solve this.

Regards,
Sven

Reply by email

Lukasz Sokol
to Sven Barth
Sven Barth wrote 40 lines
Am 19.05.2017 14:53 schrieb "Lukasz Sokol" < >: > > On 19/05/17 13:33, Sven Barth via fpc-pascal wrote: > >>>> You don't have to build a 32-bit FPC because an official >>>> released installer exists. So this is no >>>> seeing as pretty much everything is moving (or already has >>>> moved) to 64-bit, why bother with 32-bit these days. >>>> [referring to desktop and server applications - not embedded >>>> devices] >>>> >>> >>> Is there a way for native 64bit application to load a 32bit >>> library, that then can talk to a 32bit USB driver ? (on >>> Windows) >> >> Drivers (at least kernel mode drivers) must be 64-bit on 64-bit >> Windows (and also basically every other system I'm aware of). >> However it's perfectly possible to talk with a 64-bit driver from >> a 32-bit application. And no, you can't load a 32-library from a >> 64-bit process. > > This one is not a kernel-mode (at least so I think because the > same installation succeeds both on 32bit XPSP3, and in recent Win10 > 64bit)... > > (it's the old old Microchip MCHPFUSB driver used e.g. with > PIC18F4550, driver version 1.3; it's probably not as much a > 'driver' as a way to register the PID and VID with the system, more > or less; but the library interfacing it, is 32bit only) From what I can see from their site version 1.3 is the first that supports 64-bit and it indeed includes a 64-bit driver (and a 32-bit one as well). Also if I understand that correctly the source and API information to access the driver is provided as well, so you could either compile the library for 64-bit or port it to FPC to solve this.

Thanks for diving into this :) even though you didn't have to.

Confirmed, the distribution of this driver I am using, does contain the 64bit .sys file... and the source code (made in Borland C) for the .dll. They only provided precompiled 32bit dll by default though. At least in the download I currently use.

I will come back to this, when I have some time freed after the current 32bit backend I am writing now, hits a certain milestone ;)

Regards, Sven

Kind Regards
-L.

Reply by email