Someone using FPC 2.5.1 and Laz 0.9.31 on Linux is experiencing this problem?
Do not know if the same happens in Windows, but ...

Mailing lists / lazarus / 2011-06
23 messages · 9 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Someone using FPC 2.5.1 and Laz 0.9.31 on Linux is experiencing this problem?
Do not know if the same happens in Windows, but ...
2011/6/7 silvioprog :
Someone using FPC 2.5.1 and Laz 0.9.31 on Linux is experiencing this problem? Do not know if the same happens in Windows, but ...
...the error occurs when running F9.
2011/6/7 silvioprog :
I found the error! :p~~~
Bug: by default the project is coming to the -WG active even in Linux.
See:
2011/6/7 silvioprog :
The error is new:
http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=17664
Vincent
?
?
Vincent Snijders hat am 7. Juni 2011 um 16:12
geschrieben:
To what targets does -WG apply to?
Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110607/edae4cd4/attachment.html>
2011/6/7 Mattias Gaertner :
target_info.system in systems_all_windows+systems_os2+systems_macos
So win32, win64, wince, os2 and macos (not macosx).
Vincent
[...] So win32, win64, wince, os2 and macos (not macosx).
I implemented that.
Mattias
2011/6/7 Mattias Gaertner :
mac os darwin,
darwin is Mac OS X (unix like), macos is Mac OS before version 10, which ran on the m68k.
Vincent
Oops.
Fixed in 31127.
Mattias
Someone using FPC 2.5.1 and Laz 0.9.31 on Linux is experiencing this problem? Do not know…
silvioprog wroteSomeone using FPC 2.5.1 and Laz 0.9.31 on Linux is experiencing this problem? Do not know if the same happens in Windows, but ...
It's a linker parameter saying: "Win32 GUI application".
With a Linux project I just uncecked the appropriate box and it compiles again.
But:
- why is it auto-set in Linux ?
- Is it _necessary_ when compiling for Windows ?
IMHO the same project should be compilable on Windows and Linux without modification !
Thanks,
-Michael
Yes, the "Win32" is a bit misleading.
It's interesting that the fpc -h does not even mention the parameter.
It was set only for LCL applications. It didn't hurt on Linux.
- Is it _necessary_ when compiling for Windows ?
Yes.
IMHO the same project should be compilable on Windows and Linux without modification !
Tell Microsoft.
Anyway the IDE now sets the parameter only for those OS that supports the -WG.
Mattias
It's a linker parameter saying: "Win32 GUI application". With a Linux project I just…
Michael Schnell wrote- why is it auto-set in Linux ?
I believe Mattias fixed this, now.
- Is it _necessary_ when compiling for Windows ?
It depends if you want a console created with your app. There is a subsystem type somewhere in the PE header that tells windows if the application is a gui, console or driver. Hence this is a linker option.
Henry
On Wed, 08 Jun 2011 10:16:11 +0200 Yes, the "Win32" is a bit misleading. It's interesting…
2011/6/8 Mattias Gaertner :
Yes, the "Win32" is a bit misleading. It's interesting that the fpc -h does not even mention the parameter.
For me it does.
vincent at fpclin32:~/src/fpc/trunk$ compiler/ppc386 -h | grep WG -WG Specify graphic type application (EMX, OS/2, Windows)
Vincent
Indeed, 2.5.1 does, only 2.4.4 does not.
:)
Mattias
On Wed, 08 Jun 2011 10:16:11 +0200 Yes, the "Win32" is a bit misleading. It's interesting…
Mattias Gaertner wroteAnyway the IDE now sets the parameter only for those OS that supports the -WG.
Is this done by the actually selected Widget Set ? So that a project done in one OS (using the default Widget Type) can be just compiled in the other one (the IDE automatically then uses the - now different - default Widget Type) without the user required to modify anything in the project options.
-Michael
Michael Schnell hat am 8. Juni 2011 um 11:20 geschrieben:
On 06/08/2011 10:29 AM, Mattias Gaertner wrote: > Anyway the IDE now sets the parameter only for those OS that > supports the -WG. Is this done by the actually selected Widget Set ???
No, of course not.
It is done depending on the target OS.
?
Yes, like before.?
Mattias
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110608/75924b8b/attachment.html>
IMO FPC knows much better about platforms, and should ignore (or only warn) when -WG is not applicable.
DoDi
Hans-Peter Diettrich hat am 8. Juni 2011 um 12:37 geschrieben:
This was the old state. You can discuss this on the fpc list.? Mattias
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110608/228a4c45/attachment-0001.html>
I believe Mattias fixed this, now. It depends if you want a console created with your…
Just as a sidenote: while GUI and console are available in the Win* targets, the "driver" option is only available in the NativeNT target (though the driver kind is currently untested since my last additions and also highly experimental)
Regards,
Sven
On Tue, 7 Jun 2011 20:36:57 +0200 Oops. Fixed in 31127. Mattias
... and PowerPC.
Oops. Fixed in 31127.
Please keep in mind that OS/2 actually means plain OS/2 and EMX which are different targets in FPC.
Maybe it's worse to check all the -W switches in lazarus. I made them all target dependent.
2011/6/8 Florian Klaempfl :
Of course. I did not mention that to make the distinction with Mac OS X (darwin) that also runs on powerpc more clear.
?
It's worse? Do you mean "It would be better to check ...
Vincent
... and PowerPC. Please keep in mind that OS/2 actually means plain OS/2 and EMX which…
Florian Klaempfl wroteMaybe it's worse to check all the -W switches in lazarus. I made them all target dependent.
The problem that I see here will be with build script. Let's say you have a script to build your GUI program. Until now you could simply pass all stuff in a single command and get a GUI app in Windows. Now you will need to add logic to your script to try to find out the platform. It might be a problem for Makefiles, shell scripts, etc...
?
?
Felipe Monteiro de Carvalho hat am 9. Juni
2011 um 10:52 geschrieben:
This is all true, and not only a Lazarus problem, in fact, it is no longer a Lazarus problem, so maybe this topic should be discussed on the fpc list?
Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110609/f5749053/attachment.html>