[Lazarus] Error while compiling resources...

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Error while compiling resources...

Bo Berglund
I have created a class to handle the communications towards a data
acquisition instrument.

Now I am preparing the test application so I have simply made a form
with some entry boxes and a button.
Here is the main program file content:

program commtest;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms, sdposeriallaz, formmain, agisscomm, sscommtypes, sscommbuf
  { you can add units after this };

{$IFDEF WINDOWS}{$R commtest.rc}{$ENDIF}

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

When I try to run or build this there is an error on compilation,
which did not happen before I added a Spinedit, a Combobox and a Shape
to the main form. It is this:

commtest.lpr(21,1) Error: Error while compiling resources
commtest.lpr(21,1) Fatal: There were 1 errors compiling module,
stopping

I have no idea from where this comes or what to do about it.
In Delphi the version resources etc were handled by Delphi so there
was no need to manually create or edit rc files.
In fact there *is* a commtest.rc file in the project folder probably
created by lazarus so what is the problem?


Bo Berglund


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Paul Ishenin
01.02.2011 5:28, Bo Berglund wrote:
> {$IFDEF WINDOWS}{$R commtest.rc}{$ENDIF}
resource which was added by lazarus 0.9.26
> {$R *.res}
added by lazarus 0.9.30?

Remove {$IFDEF WINDOWS}{$R commtest.rc}{$ENDIF} and try again.

Best regards,
Paul Ishenin

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Graeme Geldenhuys
Op 2011-02-01 01:07, Paul Ishenin het geskryf:
> 01.02.2011 5:28, Bo Berglund wrote:
>> {$IFDEF WINDOWS}{$R commtest.rc}{$ENDIF}
> resource which was added by lazarus 0.9.26
>> {$R *.res}
> added by lazarus 0.9.30?
>
> Remove {$IFDEF WINDOWS}{$R commtest.rc}{$ENDIF} and try again.
>

Paul, I haven't tried the original posters sample app, but if your hint
is indeed the solution, maybe that hint could be added to the F1 help on
compiler errors/hints in Messages window?  I have no idea where Lazarus
IDE gets/stores those hints, but they are there, and give you a little
popup dialog with bigger description of the error. Delphi/Kylix IDE was
very good at those hints and gave extensive help - Lazarus IDE is still
a bit vague sometimes, but any added hints descriptions will start
making it more useful.



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Paul Ishenin-2
01.02.2011 13:40, Graeme Geldenhuys wrote:
> Paul, I haven't tried the original posters sample app, but if your hint
> is indeed the solution, maybe that hint could be added to the F1 help on
> compiler errors/hints in Messages window?

As I know Lazarus does not have a feature to show a help for compiler
error/warnings/hints. And yes, I like this feature in other IDEs like
Delphi.

Btw, I wrote a blog post a year ago where I paied an attention to this
problem too:
http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html

Best regards,
Paul Ishenin


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Graeme Geldenhuys
Op 2011-02-01 08:46, Paul Ishenin het geskryf:
>
> As I know Lazarus does not have a feature to show a help for compiler
> error/warnings/hints.

Well, my copy of Lazarus 0.9.29 (.30 fixes branch) does indeed show such
help. It's small, but it's there. See attached screenshot.


> And yes, I like this feature in other IDEs like
> Delphi.

It's helped me a lot over the years too.



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Untitled.png (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Bo Berglund
In reply to this post by Paul Ishenin
On Tue, 01 Feb 2011 06:07:25 +0700, Paul Ishenin <[hidden email]>
wrote:

>01.02.2011 5:28, Bo Berglund wrote:
>> {$IFDEF WINDOWS}{$R commtest.rc}{$ENDIF}
>resource which was added by lazarus 0.9.26
>> {$R *.res}
>added by lazarus 0.9.30?
>
>Remove {$IFDEF WINDOWS}{$R commtest.rc}{$ENDIF} and try again.
>

I commented out that line and the application compiled fine. :-)

The question is from where it came, this application was started when
I used an earlier version of Lazarus and at first I used the form only
to test some endian conversion functions I need to use for the data
from the attached equipment. Then yesterday I changed it to be the
test for my new functionality and at this time I was on
lazarus_0_9_30_fixes.
Maybe there is a change in behaviour between _0_9_29_fixes and the new
one?
--

Bo Berglund
Developer in Sweden


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Paul Ishenin-2
01.02.2011 15:00, Bo Berglund wrote:
> The question is from where it came, this application was started when
> I used an earlier version of Lazarus and at first I used the form only
> to test some endian conversion functions I need to use for the data
> from the attached equipment. Then yesterday I changed it to be the
> test for my new functionality and at this time I was on
> lazarus_0_9_30_fixes.
> Maybe there is a change in behaviour between _0_9_29_fixes and the new
> one?

Please read this article again:
http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html 

There are two warnings in it. One of them is about problem you see.

Best regards,
Paul Ishenin


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Sven Barth
In reply to this post by Graeme Geldenhuys
Am 01.02.2011 08:47, schrieb Graeme Geldenhuys:
> Op 2011-02-01 08:46, Paul Ishenin het geskryf:
>>
>> As I know Lazarus does not have a feature to show a help for compiler
>> error/warnings/hints.
>
> Well, my copy of Lazarus 0.9.29 (.30 fixes branch) does indeed show such
> help. It's small, but it's there. See attached screenshot.

The information of the errors might come from the
$fpcsrc/compiler/msg/errore.msg file (I don't know how they are
collected by Lazarus though).

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Mattias Gaertner
On Tue, 01 Feb 2011 10:07:47 +0100
Sven Barth <[hidden email]> wrote:

> Am 01.02.2011 08:47, schrieb Graeme Geldenhuys:
> > Op 2011-02-01 08:46, Paul Ishenin het geskryf:
> >>
> >> As I know Lazarus does not have a feature to show a help for compiler
> >> error/warnings/hints.
> >
> > Well, my copy of Lazarus 0.9.29 (.30 fixes branch) does indeed show such
> > help. It's small, but it's there. See attached screenshot.
>
> The information of the errors might come from the
> $fpcsrc/compiler/msg/errore.msg file (I don't know how they are
> collected by Lazarus though).

This might help:
http://wiki.lazarus.freepascal.org/Creating_IDE_Help#Help_for_Messages


Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Graeme Geldenhuys
Op 2011-02-01 11:17, Mattias Gaertner het geskryf:
>
> This might help:
> http://wiki.lazarus.freepascal.org/Creating_IDE_Help#Help_for_Messages


Is there a way to hook into external (non-wiki) help systems too? eg:
Say I have created detailed Compiler Messages Help in INF help format?
Thus by pressing F1 on a compiler message, I would rather want to
display the INF help.



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Mattias Gaertner
On Tue, 01 Feb 2011 12:08:00 +0200
Graeme Geldenhuys <[hidden email]> wrote:

> Op 2011-02-01 11:17, Mattias Gaertner het geskryf:
> >
> > This might help:
> > http://wiki.lazarus.freepascal.org/Creating_IDE_Help#Help_for_Messages
>
>
> Is there a way to hook into external (non-wiki) help systems too? eg:
> Say I have created detailed Compiler Messages Help in INF help format?
> Thus by pressing F1 on a compiler message, I would rather want to
> display the INF help.

I moved the FPCMessagesHelpDB to the ideintf unit idehelpintf.
You can alter it or replace it.


Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Graeme Geldenhuys
Op 2011-02-01 12:28, Mattias Gaertner het geskryf:
>
> I moved the FPCMessagesHelpDB to the ideintf unit idehelpintf.
> You can alter it or replace it.

Thanks, I'll go take a look at that.



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Error while compiling resources...

Bo Berglund
In reply to this post by Paul Ishenin-2
On Tue, 01 Feb 2011 15:14:13 +0700, Paul Ishenin <[hidden email]> wrote:

>> lazarus_0_9_30_fixes.
>> Maybe there is a change in behaviour between _0_9_29_fixes and the new
>> one?
>
>Please read this article again:
>http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html 
>
>There are two warnings in it. One of them is about problem you see.
>

Well, I just wanted to report back tha your original suggestion about
getting rid of the extar resource directive worked. Since it did I did
not read the article that you posted in the next message.

Notice: I am reading these messages in a news reader via the news
mirror at GMane and this makes me follow threads rather than time
lines....

Anyway thanks for your pointers! Now I can go on debugging the serial
communications instead. :-)

--

Bo Berglund
Developer in Sweden


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus