Recent

Author Topic: free Pascal x64 platform  (Read 21573 times)

pusuni

  • Jr. Member
  • **
  • Posts: 72
free Pascal x64 platform
« on: September 18, 2016, 05:24:18 pm »
Hello,

I installed FPC  (files fpc-3.0.0.i386-win32 and fpc-3.0.0.i386-win32.cross.x86_64-win64 )  but when I try to compile for x64 platform, I can't: I can't change to x64 platform, only I have i386 platfoms ( Win32,FreeBSD,Solaris...) in the target menu

What have I forgotten?

Thanks in advance

RAW

  • Hero Member
  • *****
  • Posts: 871
Re: free Pascal x64 platform
« Reply #1 on: September 18, 2016, 11:43:59 pm »
What about going the easy way:

Install LAZARUS IDE and get everything automatically:

- easy and fast INSTALL process
- 32bit
- 64bit
- much better IDE
- FreePascal is of course automatically installed
- write the same simple programs with the luxury of the better IDE // Project: New Project: Simple Program

I don't understand why would you like to use the FPC IDE ???
Using the LAZARUS IDE under Windows is the easiest thing in the world....

Do I miss something ...  :)

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: free Pascal x64 platform
« Reply #2 on: September 19, 2016, 01:37:17 am »
What have I forgotten?
FP-IDE uses internal compiler that is only able to target single processor.

Do I miss something ...  :)
Not everyone is fond on using lazarus. Especially when not needing the designer whatsoever.

Since fpc can be invoked from commandline, almost every programmer oriented editor is able to compile with FPC. Just requires to change the commandline parameters (or use different configuration files) in order to change the target.

There are some pascal (only) editors around created by users and that offer better integration for FPC compiler settings. Simply have a look around.

RAW

  • Hero Member
  • *****
  • Posts: 871
Re: free Pascal x64 platform
« Reply #3 on: September 19, 2016, 04:03:48 am »
OK, OK, that's a reason... I guess you mean something like "SynWrite" or "NotePAS" or "EditBone"... more or less...

It's hard to believe that they are better than LAZ_IDE, but on the other hand I haven't checked out... :D

pusuni

  • Jr. Member
  • **
  • Posts: 72
Re: free Pascal x64 platform
« Reply #4 on: September 19, 2016, 08:31:00 am »
Do I miss something ...  :)
Not everyone is fond on using lazarus. Especially when not needing the designer whatsoever.

That's the point. I have installed Lazarus too, but sometimes I need FPC only for "rapid" development.



FP-IDE uses internal compiler that is only able to target single processor.


I think that should not be an impediment to development in 64 bits. The IDE can be only 32 bit and it could call the fp with 64 bits parameters to get 64 bits program version : I don't see the problem here.

If I remember correctly, I would say, than in any previous version, I can not remember which, I could do do that in the target menu.


Regards

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: free Pascal x64 platform
« Reply #5 on: September 19, 2016, 08:56:19 am »
Quote
The IDE can be only 32 bit and it could call the fp with 64 bits parameters to get 64 bits program version : I don't see the problem here.
afaik fp-ide has the compiler integrated. ergo only the target processor for which fp-ide was compiled is available.

Feel free to have a look ]here in case you are in search for something else to use. As said, any editor will do but requires some configuration for targeting both 32 and 64 bit.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: free Pascal x64 platform
« Reply #6 on: September 19, 2016, 10:36:43 am »
Quote
The IDE can be only 32 bit and it could call the fp with 64 bits parameters to get 64 bits program version : I don't see the problem here.
afaik fp-ide has the compiler integrated. ergo only the target processor for which fp-ide was compiled is available.

Feel free to have a look ]here in case you are in search for something else to use. As said, any editor will do but requires some configuration for targeting both 32 and 64 bit.
To emphasize molly, FP IDE will NOT call any external compiler, only the one embedded inside it. It has been like that since day 1.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12896
  • FPC developer.
Re: free Pascal x64 platform
« Reply #7 on: September 19, 2016, 11:30:54 am »
Correct, compiler is internal. So you will have to build a win64 IDE yourself from sources.

I'm not sure if there is a set of debugger(gdb) libs prebuild for win64, but if not, in trunk afaik the IDE can use gdb via pipes like Lazarus does.


RAW

  • Hero Member
  • *****
  • Posts: 871
Re: free Pascal x64 platform
« Reply #8 on: September 20, 2016, 01:56:11 am »
Quote
That's the point. I have installed Lazarus too, but sometimes I need FPC only for "rapid" development.
I don't want to bother you again, but can you give me one or two hints about what this exactly means?

When I use the LAZARUS-IDE I can automatically compile/build LCL-PRG's or LLCL-PRG's (thanks to ChrisF) or simple FP-Programs without LCL and LLCL as 32bit or 64bit. And there is nothing to do except one short move to the Project-Preferences to set a Path or change to Win32-i386 for example.

What should be more rapid ?
I mean if there's something more rapid, then I really like to know what it is.  :)

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: free Pascal x64 platform
« Reply #9 on: September 20, 2016, 03:54:20 am »
I don't want to bother you again, but can you give me one or two hints about what this exactly means?

Although not directed to me i can (anti) answer a few:
- Lazarus takes (more) time to startup then most other (simple) editors
- Lazarus isn't very helpful when using a lot of individual files
- Lazarus can't handle multiple projects, let alone those using/mixing with other programming/scripting languages
- Every time you open lazarus it stares at you with a project manager that i don't want to see and demands to take action from a predefined (not my chosen) set of actions to take. You have no idea how many times that result in me just quitting the IDE and starting up my favourite editor instead.
- Changing targets can make code-tools complain at you not being able to find things (that it shouldn't be looking for in the first place).
- Why should i configure IDE to have it better suited for the situation when all i want is compiling pure pascal without LCL ? And fwiw: FPC is very capable of compiling LCL code as long as you set up your configuration properly.
- although i am aware i can configure things into details with Lazarus, i simply _hate_ the default code-completion that for me always seems to insert begin and especially end statements which kills perfectly valid code.

Lazarus is good at doing certain things that it is meant to be used for: designing LCL applications, Lazarus project management and using other FPC/Lazarus specifics.

Fast, easy coding, compiling for multiple targets editing make/config-files and editing/compiling other programming languages and managing such projects all at the same time simply isn't one of them (nor would i want Lazarus to be able to).

Ever worked with a _single_ project consisting of multiple executables ? And no. I do not want to close my current project to be able to switch between them as they are all part of the same project.

Every tool/editor/IDE has its specialties. You have to choose the right tool for the job. On many occasions Lazarus is good enough for that but on many other occasions Lazarus simply isn't the right tool :)

Quote
And there is nothing to do except one short move to the Project-Preferences to set a Path or change to Win32-i386 for example.
Please feel free to correct me in my findings written above as perhaps it is only my clumsiness that causes these issues for me.

Quote
What should be more rapid ?
I mean if there's something more rapid, then I really like to know what it is.
The editor i use for compiling FPC programs does: Tools->Compile->Target and it knows which compiler to invoke (be it FPC, LazBuild, gcc or whatever i have told it to). Default target compiles with a single press to F9 (and that ain't windows or linux  :P)

But... let's see what TS has to say about this. I personally don't consider FP-IDE a viable option as replacement but for sure it is good for remote usage and quickly compiling/editing something from shell.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #10 on: September 20, 2016, 08:18:55 am »
Correct, compiler is internal. So you will have to build a win64 IDE yourself from sources.

I'm not sure if there is a set of debugger(gdb) libs prebuild for win64, but if not, in trunk afaik the IDE can use gdb via pipes like Lazarus does.

Indeed. The current preferred way to compile trunk for x64 is with the pipes option, also because there are issues with libgdb on x64.
All you need to do is "make clean all install GDBMI=1"

There are, however, pre-built x86_64 libgdb versions available (believe it comes with cygwin64 as an install option) and it can also be built from source using mingw64 or cygwin64.
Do not use the latest version for building, but a stable version, because the master branch requires a c++ compiler and there is no fallback to C anymore.
My preference for some time is to build with the GDBMI=1 make option. Note that in that case there is one caveat: it runs in its own console under Win64. (Not on other platforms)
The reason for that is as explained in the wiki:
Newer versions of GDB are written in C++, not in C and GDBMI therefor is easier to interface. I use gdb 7.7.1 GDBMI and 7.2.x with libgdb.

This may or may not be of interest:
https://sourceware.org/gdb/wiki/cxx-conversion
« Last Edit: September 20, 2016, 08:23:11 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #11 on: September 20, 2016, 08:35:10 am »
I don't want to bother you again, but can you give me one or two hints about what this exactly means?

Although not directed to me i can (anti) answer a few:
Uhm. I could have written that ;)
- On Windows I use Delphi for non-GUI fpc apps with two compile option macro's added to the tools menu: fpc compile release and fpc compile debug.
- On linux platforms I use mostly Geany with the same options added to the Build menu. Geany also supports its own style "projects", incompatible with a lazarus lpi. LPR works fine out of the box.

Although on a sufficiently large console setting, FP-ide is very usable and comfortable if you started with Turbo Pascal or any other Turbo XXX Ide.
objects are fine constructs. You can even initialize them with constructors.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: free Pascal x64 platform
« Reply #12 on: September 20, 2016, 09:12:26 am »
Although not directed to me i can (anti) answer a few:
Some of the points are surely valid but not all. Some notes:

Quote
- Lazarus takes (more) time to startup then most other (simple) editors
Actually the startup was optimized a lot for 1.4, together with the configurable component palette feature.
It is now very snappy if you don't have lots of editor files open.

Quote
- Lazarus isn't very helpful when using a lot of individual files
You mean the startup and some other operations slow down polynomially with lots of editor files? Yes, it should be profiled further and optimized, too.

Quote
- Lazarus can't handle multiple projects, let alone those using/mixing with other programming/scripting languages
Lazarus trunk can by using the project groups feature.

Quote
- Every time you open lazarus it stares at you with a project manager that i don't want to see and demands to take action from a predefined (not my chosen) set of actions to take. You have no idea how many times that result in me just quitting the IDE and starting up my favourite editor instead.
You mean the project inspector window? It can be closed and then it stays closed. All IDE windows remember their state, including visibility, size and position.
Or, did you mean something else?

Quote
Ever worked with a _single_ project consisting of multiple executables ? And no. I do not want to close my current project to be able to switch between them as they are all part of the same project.
You can use build modes for different targets from the same source. Many things can be configured by macros. BTW, "Debug" and "Release" build modes are created semi-automatically for you (hint Thaddy).
You can use project groups for related projects and their executables.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 19262
  • Glad to be alive.
Re: free Pascal x64 platform
« Reply #13 on: September 20, 2016, 09:24:57 am »
@Juha

I knew that!  Or are you referring to several answers I gave on how to do that for Lazarus ?  O:-) - "Project Options|Compiler Options|Check build modes|Check Set Compiler Options as Default"
Anyway: that semi-auto release mode generates still too much code for my liking without further configuration.

And why is that not ON by default? Saves a hell of a lot of time answering "executable size is too big" ;)
objects are fine constructs. You can even initialize them with constructors.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: free Pascal x64 platform
« Reply #14 on: September 20, 2016, 10:01:12 am »
I knew that!  Or are you referring to several answers I gave on how to do that for Lazarus ?  O:-) - "Project Options|Compiler Options|Check build modes|Check Set Compiler Options as Default"
Anyway: that semi-auto release mode generates still too much code for my liking without further configuration.
Too much code? We can change the defaults if needed. I think I just pulled the current set of options from my hat while implementing the feature. I am no expert with compiler options.
What options would be good for release mode?

Quote
And why is that not ON by default? Saves a hell of a lot of time answering "executable size is too big" ;)

Good question. It is because some power developers, especially Michael van Canneyt, wished that build modes should not come in their way. Build modes should be invisible for people who don't use them. Those people are fond of FP IDE and wanted to continue with the same work-flow.

I personally agree more with you on this one. "Debug" and "Release" modes are useful for most people.
And yes, the "Build modes" checkbox is quite useless. Michael van Canneyt and others could easily ignore the build modes combo and setting button even if they saw it.
However the situation is not as bad as you let us understand. As you noticed you get your modes automatically after checking "Set compiler options as default".

In any case it is hard to please everybody. Build modes had to be hidden by default because FP IDE does not have them. Now other people say Lazarus is worse than FP IDE because certain build modes are not enabled by default.
Such is life... :)
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018