Wiki structure and content

Forum for discussion about the documentation project.
MrSwiss
Posts: 2874
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: none

Postby MrSwiss » Feb 18, 2018 23:48

coderJeff wrote:Most correct is "32-bit or 64-bit depenging on target platform".
Let me ask a simple question:
can FBC 32 produce a 64-bit executable (from source), or just a new FBC 64?
With the help of a rather complex build system?
(cross compiling, which I assume, to be lower than ~5% of usage)

I think that, riding the horse of "technical correctness" too hard, goes past "the intended audience".
(stressing a "exception", without first giving the "rules")
coderJeff
Site Admin
Posts: 2733
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki structure and content

Postby coderJeff » Feb 19, 2018 0:23

Yes,
fbc 32 can produce both fbc 32 and fbc 64
fbc 64 can produce both fbc 32 and fbc 64
Same for any source code, not just fbc compiler sources.

EDIT:
Yes, I would agree, most users' target platform is going to be same as the host platform. Bottom line is Integer size depends on target platform; either host by default, or cross by -target command line option.
MrSwiss
Posts: 2874
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Wiki structure and content

Postby MrSwiss » Feb 21, 2018 1:25

coderJeff wrote:Bottom line is Integer size depends on target platform; either host by default, ...
This is where I don't agree:
WIN64 + FBC 32 = default: 32bit executable, (NOT HOST depending, but COMPILER depending), therefore: Integer = Long ...
WIN64 + FBC 64 = default: 64bit executable, therefore: Integer = LongInt (can't be run on WIN32!)

BTW: this is fact, not theorie (I've got all compilers since ver. 1.00.0 in both 32/64, incl. 1.06.0 current)
fxm
Posts: 8537
Joined: Apr 22, 2009 12:46
Location: Paris (suburbs), FRANCE

Re: Wiki structure and content

Postby fxm » Feb 21, 2018 8:59

Don't confuse the compile file executed and the compiler tools used:
- The "-target <platform>" compile option allows to only select the compiler tools for the target platform when executing the compile file (the same default compile file fbc.exe is always executed whatever the requested target platform).
- But as for a 64-bit target platform the compiler tools have been generated in 64-bit executable code, I think it is impossible to generate 64-bit executable code from a 32-bit platform (even from executing the 32-bit fbc.exe file).
- By cons, executing the 32-bit fbc.exe file, one could generate 64-bit code (using the "-target <platform>" compile option), but only from a 64-bit platform.

You are right both!
coderJeff
Site Admin
Posts: 2733
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki structure and content

Postby coderJeff » Feb 21, 2018 10:58

See https://en.wikipedia.org/wiki/WoW64 - Windows-32-On-Windows-64 (WOW64) is the x86 emulator that enables Win32 applications to be run on 64-bit Windows operating systems.

It can get confusing on win64 because OS/Shell allows user to invoke both win32 and win64 executables same way. With a properly constructed build environment, it is possible to build programs on one platform for some other platform.

See Dev Cross Compiling:
The official FB release packages include an fbc capable of cross-compiling, but fbc alone is not enough

Return to “Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest