On Sun, 7 Dec 2008 22:08:10 +0100 Raymond van Venetië <[EMAIL PROTECTED]> wrote:
> > Hello, > > I've been trying to implent the CodeTools component in my > application, but unsuccessfully. > > The problem comes up when I try to "CodeTool" a unit which has > Windows in the uses clause. Codetools will return with this error > code: include file not found "base.inc". > > We can easily reproduce this error by editing one of the codetools > examples: > > Open the "getcontext.lpr' project in the directory > "lazarus\components\codetools\example". Now change the paths half-way > the code correctly, mine are like these: > Options.FPCPath:='C:\FPC\2.2.2\bin\i386-win32\fpc.exe'; > Options.FPCSrcDir:='C:\FPC\fpcbuild-2.2.2\fpcsrc'; > Options.LazarusSrcDir:='C:\lazarus'; > > If you would execute the program right now, it would run fine. > > Now open "getcontextexample.pas" in the dir > "lazarus\components\codetools\examples\scanexamples". And add the > windows unit (might occur with different units as well, haven't found > out yet). Your unit clause should look like: " Windows,Classes, > SysUtils;" now. > > Now restart the program ,getcontext, and you should see there occured > an error. It works here under linux. (I extended the example so that you can now set the FPCTARGET environment variable to see the 'cross compile' results. I set FPCTARGET to win32, so I browsed the sources as if under windows). Do you use the same paths in the IDE and does it work there? For example can you add the 'windows' unit to a uses section and find the windows.pp? And then find the base.inc? (find = via find declaration) > The output for me looks like this: > C:\lazarus\components\codetools\examples>getcontext > ### TCodeToolManager.HandleException: "include file not found > "base.inc"" at Line=33 Col=5 in > "C:\FPC\fpcbuild-2.2.2\fpcsrc\rtl\win32\windows.pp" Contexts not > found: include file not found "base.inc" > > Now I've googled around a bit, and appreantly this error occured in > the IDE, but got fixed. (Here is the link: > http://www.mail-archive.com/[EMAIL PROTECTED]/msg06397.html). > > I'm kind of stuck at the moment, so I decided to ask if someone could > help me out. Mattias _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
