FPC 64bit for windows

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FPC 64bit for windows

Zaaphod

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


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Graeme Geldenhuys-6
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

wkitty42
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...


--
  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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Michael Van Canneyt


On Mon, 15 May 2017, [hidden email] wrote:

> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Zaaphod
In reply to this post by Graeme Geldenhuys-6
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 ..
==============================================================

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Graeme Geldenhuys
Sent: Monday, May 15, 2017 7:41 AM
To: [hidden email]
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Graeme Geldenhuys-6
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Zaaphod
> 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.



-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Graeme Geldenhuys
Sent: Monday, May 15, 2017 12:18 PM
To: [hidden email]
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Graeme Geldenhuys-6
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Tomas Hajny-2
On Mon, May 15, 2017 19:57, Graeme Geldenhuys wrote:

> 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


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Zaaphod
In reply to this post by Graeme Geldenhuys-6
Thank you for pointing me in the right direction.  I was trying to go to Windows instead of source, so I was lost

James

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Graeme Geldenhuys
Sent: Monday, May 15, 2017 1:57 PM
To: [hidden email]
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Zaaphod
In reply to this post by Graeme Geldenhuys-6
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



-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Graeme Geldenhuys
Sent: Monday, May 15, 2017 1:57 PM
To: [hidden email]
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Graeme Geldenhuys-6
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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

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

James

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Graeme Geldenhuys
Sent: Thursday, May 18, 2017 6:02 PM
To: [hidden email]
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

_______________________________________________
fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Nikolay Nikolov-2
In reply to this post by Graeme Geldenhuys-6


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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Zaaphod
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

-----Original Message-----
From: fpc-pascal [mailto:[hidden email]] On Behalf Of Nikolay Nikolov
Sent: Thursday, May 18, 2017 7:39 PM
To: [hidden email]
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
_______________________________________________
fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Free Pascal - General mailing list

Am 19.05.2017 02:22 schrieb "James Richters" <[hidden email]>:
>
> 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?

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


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Graeme Geldenhuys-6
In reply to this post by Nikolay Nikolov-2
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 problem at all. But 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Graeme Geldenhuys-6
In reply to this post by Zaaphod
On 2017-05-18 23:14, 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Lukasz Sokol
In reply to this post by Graeme Geldenhuys-6
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 problem at all. But 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
>


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FPC 64bit for windows

Free Pascal - General mailing list

Am 19.05.2017 13:54 schrieb "Lukasz Sokol" <[hidden email]>:
>
> 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 problem at all. But 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


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
12
Loading...