Sign in Join

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

Mailing lists / lazarus / 2011-06

Illegal parameter: -WG

23 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

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

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

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to silvioprog

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.

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to silvioprog

2011/6/7 silvioprog :

Show quoted text 6 lines
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.

I found the error! :p~~~

Bug: by default the project is coming to the -WG active even in Linux.

See:

http://imagebin.org/157166

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

Vincent Snijders
to silvioprog

2011/6/7 silvioprog :

Show quoted text 12 lines
2011/6/7 silvioprog : > 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. I found the error! :p~~~ Bug: by default the project is coming to the -WG active even in Linux.

The error is new:
http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=17664

Vincent

Reply by email

Mattias Gaertner
to Vincent Snijders

?
?

Vincent Snijders hat am 7. Juni 2011 um 16:12
geschrieben:

Show quoted text 17 lines
2011/6/7 silvioprog : > 2011/6/7 silvioprog : >> 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. > > I found the error! :p~~~ > > Bug: by default the project is coming to the -WG active even in Linux. > The error is new: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=17664

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>

Reply by email

Vincent Snijders
to Mattias Gaertner

2011/6/7 Mattias Gaertner :

Show quoted text 15 lines
Vincent Snijders hat am 7. Juni 2011 um 16:12 geschrieben: > > Bug: by default the project is coming to the -WG active even in Linux. > > > > The error is new: > http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=17664 To what targets does -WG apply to? From http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/options.pas?r1=17664&r2=17663&pathrev=17664

target_info.system in systems_all_windows+systems_os2+systems_macos

So win32, win64, wince, os2 and macos (not macosx).

Vincent

Reply by email

Vincent Snijders
to Mattias Gaertner

2011/6/7 Mattias Gaertner :

Show quoted text 8 lines
On Tue, 7 Jun 2011 17:02:30 +0200 Vincent Snijders wrote: >[...] > So win32, win64, wince, os2 and macos (not macosx). I implemented that.

mac os darwin,
darwin is Mac OS X (unix like), macos is Mac OS before version 10, which ran on the m68k.

Vincent

Reply by email

Mattias Gaertner
to Vincent Snijders
Show quoted text 13 lines
2011/6/7 Mattias Gaertner : > On Tue, 7 Jun 2011 17:02:30 +0200 > Vincent Snijders wrote: > >>[...] >> So win32, win64, wince, os2 and macos (not macosx). > > I implemented that. > mac os darwin, darwin is Mac OS X (unix like), macos is Mac OS before version 10, which ran on the m68k.

Oops.
Fixed in 31127.

Mattias

Reply by email

Michael Schnell
to silvioprog: Someone using FPC 2.5.1 and Laz 0.9.31 on Linux is experiencing this problem? Do not know…
silvioprog wrote
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 ...

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

Reply by email

Mattias Gaertner
to Michael Schnell
Show quoted text 5 lines
On 06/07/2011 03:39 PM, silvioprog wrote: > 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 ... It's a linker parameter saying: "Win32 GUI application".

Yes, the "Win32" is a bit misleading.
It's interesting that the fpc -h does not even mention the parameter.

Show quoted text 6 lines
With a Linux project I just uncecked the appropriate box and it compiles again. But: - why is it auto-set in Linux ?

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

Reply by email

Henry Vermaak
to Michael Schnell: 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

Reply by email

Mattias Gaertner
to Vincent Snijders
Show quoted text 9 lines
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)

Indeed, 2.5.1 does, only 2.4.4 does not.
:)

Mattias

Reply by email

Michael Schnell
to Mattias Gaertner: On Wed, 08 Jun 2011 10:16:11 +0200 Yes, the "Win32" is a bit misleading. It's interesting…
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 ? 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

Reply by email

Mattias Gaertner
to Michael Schnell

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

Show quoted text 5 lines
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.

Yes, like before.?
Mattias
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110608/75924b8b/attachment.html>

Reply by email

Hans-Peter Diettrich
to Mattias Gaertner
Show quoted text 9 lines
> > 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.

IMO FPC knows much better about platforms, and should ignore (or only warn) when -WG is not applicable.

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich

Hans-Peter Diettrich hat am 8. Juni 2011 um 12:37 geschrieben:

Show quoted text 14 lines
Mattias Gaertner schrieb: >? > > 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. IMO FPC knows much better about platforms, and should ignore (or only warn) when -WG is not applicable.

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>

Reply by email

Sven Barth
to Henry Vermaak: I believe Mattias fixed this, now. It depends if you want a console created with your…
Henry Vermaak wrote 11 lines
On 08/06/11 09:16, 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.

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

Reply by email

Florian Klaempfl
to Mattias Gaertner: On Tue, 7 Jun 2011 20:36:57 +0200 Oops. Fixed in 31127. Mattias
Mattias Gaertner wrote 16 lines
On Tue, 7 Jun 2011 20:36:57 +0200 Vincent Snijders wrote: > 2011/6/7 Mattias Gaertner : >> On Tue, 7 Jun 2011 17:02:30 +0200 >> Vincent Snijders wrote: >> >>> [...] >>> So win32, win64, wince, os2 and macos (not macosx). >> >> I implemented that. >> > > mac os darwin, > darwin is Mac OS X (unix like), macos is Mac OS before version 10, > which ran on the m68k.

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

Reply by email

Vincent Snijders
to Florian Klaempfl

2011/6/8 Florian Klaempfl :

Show quoted text 7 lines
Am 07.06.2011 20:43, schrieb Mattias Gaertner: >> mac os darwin, >> darwin is Mac OS X (unix like), macos is Mac OS before version 10, >> which ran on the m68k. ... and PowerPC.

Of course. I did not mention that to make the distinction with Mac OS X (darwin) that also runs on powerpc more clear.

Show quoted text 5 lines
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.

?

It's worse? Do you mean "It would be better to check ...

Vincent

Reply by email

Felipe Monteiro de Carvalho
to Florian Klaempfl: ... and PowerPC. Please keep in mind that OS/2 actually means plain OS/2 and EMX which…
Florian Klaempfl wrote
Maybe 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

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho

?
?

Felipe Monteiro de Carvalho hat am 9. Juni
2011 um 10:52 geschrieben:

Show quoted text 10 lines
On Wed, Jun 8, 2011 at 7:48 PM, Florian Klaempfl wrote: > Maybe 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...

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>

Reply by email