[Lazarus] RFC: Code tools Feature?
Hi, Is it possible to have the following in the code tools: I would like to be able to specify a code snippet that is inserted at the start and end of a procedure (after begin, before end keywords). The code snippet should contains some macros like $(CLASSNAME) $(METHODNAME). Conceivably, other macros can be thought of: parameters, unit name etc. The intended use is that the IDE generates stuff like Procedure TMyClass.MyMethod; begin {$IFDEF LOGPROCESSFLOW}Log('Entering TMyClass.MyMethod');{$ENDIF} {$ENDIF LOGPROCESSFLOW}Log('Exiting TMyClass.MyMethod');{$ENDIF} end; If I have specified as code snippets {$IFDEF LOGPROCESSFLOW}Log('Entering $(CLASSNAME).$(METHODNAME)');{$ENDIF} for the begin keyword, and for the end keyword: {$IFDEF LOGPROCESSFLOW}Log('Exiting $(CLASSNAME).$(METHODNAME)');{$ENDIF} Similarly, I'd like to be able to specify a code snippet to insert before/after the procedure header: { -- AUTHOR: $AUTHOR PURPOSE: ARGUMENTS: RETURN VALUE: -} (just an example) Maybe some additional snippets can be imagined. I am specifically looking for the first one. Additionally (and quite importantly) this behaviour should be easily toggled on/off, without having to empty the templates. Maybe such a thing already exists, but I have not been able to locate it ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
Michael Van Canneyt wrote: Hi, Is it possible to have the following in the code tools: I would like to be able to specify a code snippet that is inserted at the start and end of a procedure (after begin, before end keywords). The code snippet should contains some macros like $(CLASSNAME) $(METHODNAME). Conceivably, other macros can be thought of: parameters, unit name etc. The intended use is that the IDE generates stuff like Procedure TMyClass.MyMethod; begin {$IFDEF LOGPROCESSFLOW}Log('Entering TMyClass.MyMethod');{$ENDIF} {$ENDIF LOGPROCESSFLOW}Log('Exiting TMyClass.MyMethod');{$ENDIF} end; If the compiler could track the current procedure (or function, or class.method etc.) name, then couldn't that be done with a macro? Then the app source would be a less-obtrusive: Procedure TMyClass.MyMethod; begin_logged end_logged; Otherwise, since this is such a common requirement, how about a non-fatal equivalent of Assert()? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
On Thu, 27 Mar 2014, Mark Morgan Lloyd wrote: Michael Van Canneyt wrote: Hi, Is it possible to have the following in the code tools: I would like to be able to specify a code snippet that is inserted at the start and end of a procedure (after begin, before end keywords). The code snippet should contains some macros like $(CLASSNAME) $(METHODNAME). Conceivably, other macros can be thought of: parameters, unit name etc. The intended use is that the IDE generates stuff like Procedure TMyClass.MyMethod; begin {$IFDEF LOGPROCESSFLOW}Log('Entering TMyClass.MyMethod');{$ENDIF} {$ENDIF LOGPROCESSFLOW}Log('Exiting TMyClass.MyMethod');{$ENDIF} end; If the compiler could track the current procedure (or function, or class.method etc.) name, then couldn't that be done with a macro? Then the app source would be a less-obtrusive: Procedure TMyClass.MyMethod; begin_logged end_logged; I prefer not to use macros. This is not C. I like to see explicitly what is happening. Pascal macros are also not customizable/parametrizable (as the IDE macros are). Otherwise, since this is such a common requirement, how about a non-fatal equivalent of Assert()? I don't think this should be a promoted to a language feature either. There may be additional use cases for this feature, which we cannot all cover with language features. The comment header for one is something encountered quite often in teams that need to follow some standards, for ISO 9001 etc. In the IDE, at the level of generated sources, the user is able to control every aspect of what happens. That may well include inserting any hypothetical pascal-language-level macro. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
On Thu, 27 Mar 2014 09:22:21 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I would like to be able to specify a code snippet that is inserted at the start and end of a procedure [...] Similarly, I'd like to be able to specify a code snippet to insert before/after the procedure header: [...] Additionally (and quite importantly) this behaviour should be easily toggled on/off, without having to empty the templates. Maybe such a thing already exists, but I have not been able to locate it ? There are several such things. They need some work to make them more comfortable though: 1. You can add code templates (Ctrl-j). For example for the method start go to Tools / Code templates, then add a new one, give it a name, e.g. 'pb' and a description 'procedure begin', click enable macros And as source: {$IFDEF LOGPROCESSFLOW}Log('Entering $ProcedureName()');{$ENDIF} Click ok to save and close dialog. Move cursor behind the begin and type pb and Ctrl+j. 2. I wrote a small command line utility for Graeme that can add/remove code to starts/ends of procedures. He needed it for profiling. The tool is here: components/codetools/examples/addfpprofcalls.lpi It is merely a demo, but maybe someone wants to write a dialog and/or IDE package. 3. Donald Ziesig added templates to the IDE to configure some parts of class completion. You can try it by compiling Lazarus with -dEnableCodeCompleteTemplates. Then you should see new options on the code creation page. I had not the time yet to finish it. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
On 27/03/2014 08:22, Michael Van Canneyt wrote: The intended use is that the IDE generates stuff like Procedure TMyClass.MyMethod; begin {$IFDEF LOGPROCESSFLOW}Log('Entering TMyClass.MyMethod');{$ENDIF} {$ENDIF LOGPROCESSFLOW}Log('Exiting TMyClass.MyMethod');{$ENDIF} end; If I have specified as code snippets {$IFDEF LOGPROCESSFLOW}Log('Entering $(CLASSNAME).$(METHODNAME)');{$ENDIF} Not an exact match to your question, but: Do you know LazLogger! It has DebuglnEnter/DebuglnExit which will add a nice intend (so long as you do not skip them by raising an exception. You can use a code template, to insert them at caret. debugln(['$ProcedureName() '|]); If you are at the begin of a procedure, you can record a macro, using the key stroke for find block other end, that allows to insert opening and closing statement. In addition, you do not need the IfDef. Debugln is in unit LazLoggerBase or LazLogger. If you change the uses to LazLoggerDummy, then all debugln are replaced by empty inline methods (the inline does not work for array of const though). LazLoggerBase gets a working debugln, but logs to nowhere. (use in packages, and units) LazLogger installs the actual Logger (to file or console). Affects all debugln that where used from LazLoggerBase (use in your main unit) it allows on command line --debug-log= --debug-enable --debug-disable debuglneEnter/Exit can be grouped to be enabled/disabled Debugln(GROUPNAME, ['msg', data]) see gdbmidebugger units how to RegisterLogGroup -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
Michael Van Canneyt wrote: If the compiler could track the current procedure (or function, or class.method etc.) name, then couldn't that be done with a macro? Then the app source would be a less-obtrusive: Procedure TMyClass.MyMethod; begin_logged end_logged; I prefer not to use macros. This is not C. I like to see explicitly what is happening. Pascal macros are also not customizable/parametrizable (as the IDE macros are). Would you be happier if it were described or implemented like an ALGOL control card? This is a clear case of something which is needed fairly regularly by all users of the language, rather than just by those who use Lazarus, and having a decent way to implement it at the language level is preferable even if there were an IDE shortcut. Rejecting a feature out-of-hand simply because it's not invented here is highly undesirable in my opinion. Everybody agrees that C has problems and many agree that even the current C++ standard is basically putting lipstick on a pig, but that's no reason to avoid coopting and reimplementing the good bits /properly/. Besides which, macro replacement predates C by many years. Don't get me going on that one since I risk being an olympic-grade bore :-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
On Thu, 27 Mar 2014, Martin Frb wrote: On 27/03/2014 08:22, Michael Van Canneyt wrote: The intended use is that the IDE generates stuff like Procedure TMyClass.MyMethod; begin {$IFDEF LOGPROCESSFLOW}Log('Entering TMyClass.MyMethod');{$ENDIF} {$ENDIF LOGPROCESSFLOW}Log('Exiting TMyClass.MyMethod');{$ENDIF} end; If I have specified as code snippets {$IFDEF LOGPROCESSFLOW}Log('Entering $(CLASSNAME).$(METHODNAME)');{$ENDIF} Not an exact match to your question, but: Do you know LazLogger! I do now :) It has DebuglnEnter/DebuglnExit which will add a nice intend (so long as you do not skip them by raising an exception. You can use a code template, to insert them at caret. debugln(['$ProcedureName() '|]); If you are at the begin of a procedure, you can record a macro, using the key stroke for find block other end, that allows to insert opening and closing statement. In addition, you do not need the IfDef. But I want the ifdef :) The reason is that I very often add some code inside the $IFDEF to check for assigned props, params and whatnot. So, having it there from the start is an advantage. And like I said: the feature can be used for a lot more than just logging. Nevertheless, I am going to check out lazlogger in more detail. Seems like good stuff for an article. Thanks for the tip ! Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
On Thu, 27 Mar 2014, Mark Morgan Lloyd wrote: Michael Van Canneyt wrote: If the compiler could track the current procedure (or function, or class.method etc.) name, then couldn't that be done with a macro? Then the app source would be a less-obtrusive: Procedure TMyClass.MyMethod; begin_logged end_logged; I prefer not to use macros. This is not C. I like to see explicitly what is happening. Pascal macros are also not customizable/parametrizable (as the IDE macros are). Would you be happier if it were described or implemented like an ALGOL control card? This is a clear case of something which is needed fairly regularly by all users of the language, rather than just by those who use Lazarus, and having a decent way to implement it at the language level is preferable even if there were an IDE shortcut. Well, we differ in our opinions here. The less we do at the language level, the better. It's getting bloated enough as it to my taste. So yes, it stops there as far as I am concerned. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
On Thu, 27 Mar 2014, Mattias Gaertner wrote: On Thu, 27 Mar 2014 09:22:21 +0100 (CET) Michael Van Canneyt mich...@freepascal.org wrote: [...] I would like to be able to specify a code snippet that is inserted at the start and end of a procedure [...] Similarly, I'd like to be able to specify a code snippet to insert before/after the procedure header: [...] Additionally (and quite importantly) this behaviour should be easily toggled on/off, without having to empty the templates. Maybe such a thing already exists, but I have not been able to locate it ? There are several such things. They need some work to make them more comfortable though: 1. You can add code templates (Ctrl-j). For example for the method start go to Tools / Code templates, then add a new one, give it a name, e.g. 'pb' and a description 'procedure begin', click enable macros And as source: {$IFDEF LOGPROCESSFLOW}Log('Entering $ProcedureName()');{$ENDIF} Click ok to save and close dialog. Move cursor behind the begin and type pb and Ctrl+j. This is what I do now (useful for adding to existing code), but I want to make it even more simple. 2. I wrote a small command line utility for Graeme that can add/remove code to starts/ends of procedures. He needed it for profiling. The tool is here: components/codetools/examples/addfpprofcalls.lpi It is merely a demo, but maybe someone wants to write a dialog and/or IDE package. Aha... Good for backfitting existing code :) 3. Donald Ziesig added templates to the IDE to configure some parts of class completion. You can try it by compiling Lazarus with -dEnableCodeCompleteTemplates. Then you should see new options on the code creation page. I had not the time yet to finish it. This seems to be what I am looking for. I will try this and report. Thanks. You confirmed once more that Lazarus is simply the best code editor around ;) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] SQLQuery
Hi guys, i use a SQLQuery in a project to connect to a Firebird database. In my table i use a BEFORE INSERT trigger for my primary ID field. In the same transaction i have to insert a detail row in another column. How can i find out the ID result after post but before commit? ps : i tried ZEOSDB and generators worked like a charm, but using ZEOSDB made my app sluggish-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLQuery
On Thu, 27 Mar 2014, Chris Crori wrote: Hi guys, i use a SQLQuery in a project to connect to a Firebird database. In my table i use a BEFORE INSERT trigger for my primary ID field. In the same transaction i have to insert a detail row in another column. How can i find out the ID result after post but before commit? There is currently no way to do this unless you run a second query that uses a unique field to retrieve the ID. if you are using a manual insert query you can do INSERT INTO YOURTABLE (fields) VALUES (yourvalues) RETURNING ID and use a OPEN to retrieve the ID. ps : i tried ZEOSDB and generators worked like a charm, but using ZEOSDB made my app sluggish There are some plans to support such a thing but nothing was implemented yet. Michael.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLQuery
On Thu, 27 Mar 2014, Chris Crori wrote: Hi guys, i use a SQLQuery in a project to connect to a Firebird database. In my table i use a BEFORE INSERT trigger for my primary ID field. In the same transaction i have to insert a detail row in another column. How can i find out the ID result after post but before commit? There is currently no way to do this unless you run a second query that uses a unique field to retrieve the ID. if you are using a manual insert query you can do INSERT INTO YOURTABLE (fields) VALUES (yourvalues) RETURNING ID and use a OPEN to retrieve the ID. ps : i tried ZEOSDB and generators worked like a charm, but using ZEOSDB made my app sluggish There are some plans to support such a thing but nothing was implemented yet. Michael. There is a DBGrid linked to that Query so i can't :( also i tried to use returning inside the InsertSql statement and it didn't word (i thought maybe it will update the ID field) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] RFC: Code tools Feature?
On Do, 2014-03-27 at 13:09 +0100, Michael Van Canneyt wrote: On Thu, 27 Mar 2014, Martin Frb wrote: In addition, you do not need the IfDef. But I want the ifdef :) The reason is that I very often add some code inside the $IFDEF to check for assigned props, params and whatnot. So, having it there from the start is an advantage. And like I said: the feature can be used for a lot more than just logging. Indeed. It would be usable for implementing Design by Contract checking scheme, for external code beautifying/printing/version control tools for example. Or maybe tool driven license enforcement, changing the license checking code and it's positions often by using templates. Maybe code injection, but I'm not really sure with that. -- Marc Santhoff m.santh...@web.de -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] fcl-web deleted headers?
Hi, I'm sending a custom header I called Filename to a Brook CGI (which uses TRequest from fcl-web) but I can't access that header. Here's what I capture on the Network tab on Chrome's developer tools; POST /cgi-bin/gtir2/test/ HTTP/1.1 Host: 127.0.0.1:8080 Connection: keep-alive Content-Length: 36409 Origin: http://127.0.0.1:8080 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1897.2 Safari/537.36 Filename: 1234 Content-Type: application/vnd.oasis.opendocument.text Accept: */* Referer: http://127.0.0.1:8080/gtirii/ Accept-Encoding: gzip,deflate,sdch Accept-Language: es-419,es;q=0.8,en;q=0.6 And here's what I capture with fcl-web: Accept:*/* Accept-Encoding:gzip,deflate,sdch Accept-Language:es-419,es;q=0.8,en;q=0.6 Connection:keep-alive Content-Length:36409 Content-Type:application/vnd.oasis.opendocument.text Referer:http://127.0.0.1:8080/gtirii/ Server:127.0.0.1 User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1897.2 Safari/537.36 Host:/ Cache-Control:/var/www/index.html X-Requested-With:127.0.0.1 The code I'm using to print the header's output is this (on a POST handler): for I := 0 to TheRequest.FieldCount - 1 do begin lAccession := lAccession + TheRequest.FieldNames[I] + ':' + TheRequest.FieldValues[I] + 'br'; end; raise Exception.Create(lAccession); Why the difference? Btw, I'm using fpc 2.7.1 compiled from trunk just before asking here, on linux x86_64 and Lazarus trunk. Regards, -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Codetools include search path(s)
I've been experimenting with the codetools example finddeclaration project, using the codetools outside the IDE, and feeding FPC and Lazarus source directory information via environment variables to the CodeToolBoss constructor, which works OK for simple source files. However, when looking for, say, the declaration of TLabel in StdCtrls the linkscanner barfs over an include file it cannot find. TCodeToolManager.HandleException: include file not found lcl_defines.inc at Line=21 Col=5 in c:\lazarus\lcl\std ctrls.pp How should I pass the location of lcl\include\ when initializing the codetools? Howard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] fcl-web deleted headers?
On Thu, 27 Mar 2014, Leonardo M. Ramé wrote: Hi, I'm sending a custom header I called Filename to a Brook CGI (which uses TRequest from fcl-web) but I can't access that header. To my knowledge, the CGI protocol doesn't support the use of custom headers. Michael.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLQuery
Done! I used the second query method on the beforepost event and it works fine I would like to try expanding the TSQLQuery to be able to use generator fields, can someone help me send the patch after? Thank you Michael for your help -Αρχικό μήνυμα- From: Chris Crori Sent: Thursday, March 27, 2014 3:53 PM To: Lazarus mailing list Subject: Re: [Lazarus] SQLQuery On Thu, 27 Mar 2014, Chris Crori wrote: Hi guys, i use a SQLQuery in a project to connect to a Firebird database. In my table i use a BEFORE INSERT trigger for my primary ID field. In the same transaction i have to insert a detail row in another column. How can i find out the ID result after post but before commit? There is currently no way to do this unless you run a second query that uses a unique field to retrieve the ID. if you are using a manual insert query you can do INSERT INTO YOURTABLE (fields) VALUES (yourvalues) RETURNING ID and use a OPEN to retrieve the ID. ps : i tried ZEOSDB and generators worked like a charm, but using ZEOSDB made my app sluggish There are some plans to support such a thing but nothing was implemented yet. Michael. There is a DBGrid linked to that Query so i can't :( also i tried to use returning inside the InsertSql statement and it didn't word (i thought maybe it will update the ID field) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Crosscompile Target Win32 error : ( /units/i386-win32/win32] Error 1)
Hi all, Good day, For Lazarus 1.0.14/Ubuntu 64 Precise I have successfully installed crosscompile win32/i386 and can generate win32 executable. I upgraded to 1.2. I've moved the old .lazarus to .lazarus_0.14 because Laz 1.2 is unable to upgrade it and was using instead the binary in that directory which is the 1.014 version and can't locate the correct fpcsrc version so I just moved that directory to let the new 1.2 create a new one. I was able again to recompile lazarus to target win32/i386 and generated win32 exe. However, I accidentally enter the command mv .lazarus .lazarus_0.14, this command in linux gives you no warning whatsoever that there is an existing directory with that name. So it just followed that command, and my existing .lazarus which has the lazarus1.2 binary that can target win32 was lost. Restoring from .lazarus_0.14 gives me the old lazarus binary. So I think this is just a trivial problem, and to correct this, I started from scratch. I removed again .lazarus and start lazarus to recreate the directory. When trying to recompile lazarus (Option Prof to build[Clean Up + Build All] LCL Widget type[win32/win64] Target OS:[win32] Target CPU:[i386]) I have now this error: make[1]: *** [../units/i386-win32/win32] Error 1 Recompiling fpcsrc doesn't work. Also the reason why I upgraded to 1.2 is because I want also to target both 1.0.14 and 1.2 emitted this error: make[1]: *** [../units/i386-linux/gtk2] Error 1 Anybody experience this or have an idea? Best regards, Allan -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Crosscompile Target Win32 error : ( /units/i386-win32/win32] Error 1)
On Fri, 28 Mar 2014 09:42:17 +0800 (PHT) Allan E. Registos allan.regis...@smpc.steniel.com.ph wrote: [...] For Lazarus 1.0.14/Ubuntu 64 Precise I have successfully installed crosscompile win32/i386 and can generate win32 executable. I upgraded to 1.2. I've moved the old .lazarus to .lazarus_0.14 because Laz 1.2 is unable to upgrade it and was using instead the binary in that directory which is the 1.014 version The starter checks the file dates. If your custom built IDE in the .lazarus directory is newer than the IDE installed via the deb package it starts your custom IDE. Maybe we need a better heuristic. and can't locate the correct fpcsrc version What is the correct fpcsrc version? so I just moved that directory to let the new 1.2 create a new one. I was able again to recompile lazarus to target win32/i386 and generated win32 exe. However, I accidentally enter the command mv .lazarus .lazarus_0.14, this command in linux gives you no warning whatsoever that there is an existing directory with that name. So it just followed that command, and my existing .lazarus which has the lazarus1.2 binary that can target win32 was lost. Normally mv .lazarus .lazarus_0.14 moves it to .lazarus_0.14/.lazarus. Your files were not lost, just moved. Restoring from .lazarus_0.14 gives me the old lazarus binary. So I think this is just a trivial problem, and to correct this, I started from scratch. I removed again .lazarus and start lazarus to recreate the directory. Ok. This should give you a pretty standard Lazarus 1.2. When trying to recompile lazarus (Option Prof to build[Clean Up + Build All] LCL Widget type[win32/win64] Target OS:[win32] Target CPU:[i386]) I have now this error: make[1]: *** [../units/i386-win32/win32] Error 1 Recompiling fpcsrc doesn't work. Please post the other messages before the error message. How did you install the cross compiled units for win32? Also the reason why I upgraded to 1.2 is because I want also to target both 1.0.14 and 1.2 emitted this error: make[1]: *** [../units/i386-linux/gtk2] Error 1 Anybody experience this or have an idea? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Codetools include search path(s)
On Thu, 27 Mar 2014 20:20:39 + Howard Page-Clark h...@talktalk.net wrote: I've been experimenting with the codetools example finddeclaration project, using the codetools outside the IDE, and feeding FPC and Lazarus source directory information via environment variables to the CodeToolBoss constructor, which works OK for simple source files. However, when looking for, say, the declaration of TLabel in StdCtrls the linkscanner barfs over an include file it cannot find. TCodeToolManager.HandleException: include file not found lcl_defines.inc at Line=21 Col=5 in c:\lazarus\lcl\std ctrls.pp How should I pass the location of lcl\include\ when initializing the codetools? I extended the wiki with some explanations how the codetools defines work: http://wiki.lazarus.freepascal.org/Codetools#Defining_search_paths_and_macros Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus