Recent

Author Topic: newbie almost got lazarus working on windows  (Read 15675 times)

milleratotago

  • New Member
  • *
  • Posts: 12
newbie almost got lazarus working on windows
« on: December 21, 2009, 09:10:56 am »
Please help a long-time console fpc user but total lazarus newbie totally
stymied with a first-time install problem.

(almost the identical problem was posted under "almost got lazurus working on ubuntu" in the linux installation forum, but i couldn't understand the answers)

I've downloaded and installed the win32 binaries for the 0.9.28.2 beta from SourceForge,
seemingly with no problems.

The IDE opens up nicely. I can see a default Form1, can put buttons on it, and can change their captions.

But when I try to define an onclick method, the IDE complains with this message:
  C:\lazarus\lcl\forms.pp(45,3) Error: unit not found: gettext
At this point, the Source Editor also opens up Forms.pp and highlights the end of the Uses clause,
which by the way ends rather strangely thus:
  {$ifndef wince},gettext{$endif}// remove ifdefs when gettext is fixed and a new fpc is released
  ;
I can't get past this point.


Also, another problem..if I just try to compile a program with buttons (before trying to define
any onclick methods), I get this fatal error:
 C:\lazarus\lcl\masks.pas(28,22) Fatal: Can't find unit contnrs used by Masks.


Doubtless I have some paths set wrong somewhere, but I've spent several hours
so far trying various combinations with no success.  I'd really appreciate some
knowledgable input about now--can anyone help?








Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: newbie almost got lazarus working on windows
« Reply #1 on: December 21, 2009, 10:46:11 am »
Most likely in Lazarus uses the wrong version of the fpc compiler (you will have two now: the one you had and the one that came with Lazarus)
.
In Menu -> Environment -> Options
check settings for
- compiler path
- fpc source

They should point to the binaries/sources that came with the windows installer, tipically in a subdirectory of the Lazarus installation path.

Bart

milleratotago

  • New Member
  • *
  • Posts: 12
Re: newbie almost got lazarus working on windows
« Reply #2 on: December 22, 2009, 05:47:26 am »
Thanks for those suggestions, Bart.  I actually thought that might be a problem, so I renamed the original fpc directory before installing lazarus--to make sure there was no other fpc.exe on the path. But evidently that precaution was not enough.

I also checked the Environment Options as you suggested: The compiler and source paths do point to subdirectories of c:\lazarus where the new files were installed, so that isn't the problem (and isn't sufficient to tell lazarus where to find everything it needs).

I also tried a new installation on another computer that had never had FPC in the first place, and that definitely works better (that one doesn't fail until it tries to link, complaining that the file project1.manifest cannot be found).  So, it definitely does look like something about the original FPC installation is responsible for at least part of the problem on the original machine.  Since I do have to use that original machine, I need to track down this problem before I can proceed.

Could either of these be the problem with a previous FPC installation:
Is lazarus maybe getting distracted by finding "FPC" in the path (even though the indicated directory does not exist), or does it maybe use some environment variables that might have been set by the FPC installation?

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: newbie almost got lazarus working on windows
« Reply #3 on: December 22, 2009, 11:56:56 am »
Well, that sucks.

Can you check the paths in fpc.cfg (the one in your Lazarus subdirectory)?
They should all point to subdirs in the installation path.

B.t.w. what version of fpc did you use previously?
If that one is older you might consider removing it.

Bart


milleratotago

  • New Member
  • *
  • Posts: 12
Re: newbie almost got lazarus working on windows
« Reply #4 on: December 22, 2009, 07:54:21 pm »

>Can you check the paths in fpc.cfg (the one in your Lazarus subdirectory)?
>They should all point to subdirs in the installation path.
They do.

>B.t.w. what version of fpc did you use previously?
>If that one is older you might consider removing it.
2.0.0.

OK, I uninstalled Lazarus, then put my FPC2.0 installation
back to where it was (so all components would be found
where they had originally been installed), and then I
uninstalled FPC2.0.  Finally, I reinstalled Lazarus on
a now "FPC-free" computer (or so I hoped).
Unfortunately, nothing changed-  I can still add
buttons, but I cannot specify OnClick handlers for
them (IDE complains it cannot find gettext).

If I can think of anything else to try, I will.
Further suggestions would be very welcome.

Thanks for your time.


Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: newbie almost got lazarus working on windows
« Reply #5 on: December 23, 2009, 06:01:53 pm »
Can you verify that gettext.ppu is on your system?

(it should be in ($lazarus)\fpc\2.2.4\units\i386-win32\fcl-base
Assuming you have 0.9.28.2 comes with 2.2.4 version of fpc)

Most of the time, this kind of error message (cannot find unit x used by z) is because the ppu file fpc uses is compiled with a different version that the fpc you are using at the moment.

That would seem rather strange for a precompiled 0.9.28.2 version however.

Bart

milleratotago

  • New Member
  • *
  • Posts: 12
Re: newbie almost got lazarus working on windows
« Reply #6 on: December 23, 2009, 07:13:00 pm »
>Can you verify that gettext.ppu is on your system?
>(it should be in ($lazarus)\fpc\2.2.4\units\i386-win32\fcl-base
Yes, it is there. 8 Kb, 11:23 am, 25/10/2009

Yesterday I investigated the possibility that Sophos anti-virus
software interfered with the installation and/or execution of
Lazarus, but that did not seem to be the problem.

Could Novell be the problem?  The two machines that fail
are both running Novell, whereas the one that works is not.
Unfortunately I'm not sure how to test whether that's it.
Well, you can see I'm just flailing around at this point.

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek

milleratotago

  • New Member
  • *
  • Posts: 12
Re: newbie almost got lazarus working on windows
« Reply #8 on: December 24, 2009, 06:24:59 pm »
Yes, that looks like the right download link to me.
I ended up with lazarus-0.9.28.2-fpc-2.2.4-win32.exe (63,067 Kb).

Running Win XP Professional, Version 2002, Service Pack 3.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: newbie almost got lazarus working on windows
« Reply #9 on: December 24, 2009, 09:18:42 pm »
Are the environment options (Paths) correct?

Tell us what they are.

milleratotago

  • New Member
  • *
  • Posts: 12
Re: newbie almost got lazarus working on windows
« Reply #10 on: December 24, 2009, 10:30:49 pm »
Lazarus directory: C:\lazarus\
Compiler path: C:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.exe
FPC source directory: c:\lazarus\fpc\2.2.4\source\
Make path: C:\lazarus\fpc\2.2.4\bin\i386-win32\make.exe
Directory for building test projects: C:\DOCUME~1\jeff\LOCALS~1\Temp\

milleratotago

  • New Member
  • *
  • Posts: 12
Re: newbie almost got lazarus working on windows - all problems solved
« Reply #11 on: December 25, 2009, 03:53:26 am »

All is working now. The problem was an environment variable
called PPC_CONFIG_PATH that was a hold-over from some
ancient installation (I don't even remember which one).
This environment variable pointed to my \Pascal
directory, in which there was an old fpc.cfg.
Its settings were being used instead of those of the
fpc.cfg in the new lazarus\fpc directory.  Changing the
value of that environment variable to a nonexistent
directory was necessary and sufficient to solve all
of the problems that I was having.

Thanks for your time, Bart et al.

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: newbie almost got lazarus working on windows
« Reply #12 on: December 25, 2009, 11:51:55 am »
I'm glad you solved it.

Happy coding with Lazarus/FreePascal!

Bart

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: newbie almost got lazarus working on windows
« Reply #13 on: December 25, 2009, 01:50:47 pm »
Thanks. I learned a new way to ruin the fpc / lazarus configuration :-)

 

TinyPortal © 2005-2018