Re: [fpc-pascal] Implementing AggPas with PtcGraph
>I use Git for just about any source code I work with. I've just recently started using GIT, and have been using it for my own applications. My solution until now has been to duplicate any units that needed modification in with my source code so it would show up in my GIT repository. But I like the idea of just maintain my own local copy and put a custom branch that I can keep maintained easier.. and who knows maybe I'll come up with something worth submitting to the project. >We all love a mystery. ;-) Especially once it's solved >Yeah, probably not the best naming convention. Perhaps some comments at the top of both units explaining the difference and also mentioning the other unit exits would save some confusion >The agg_2D.pas unit is a 100% non-GUI unit. It is meant for console or >web (eg: CGI) style applications. No GUI toolkit dependencies are required. Sound like I was using the correct unit anyway for my console apps James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
I was waiting for the right time to also offer my sincere thanks to all teams and individual contributors. I have been using fpc and Lazarus IDE for quite some years now and I am very pleased with the constant progress and improvement of these development tools. I have enjoyed reading and learned a lot on these mailing lists as well. My hope is that contributions continue for many years to come and that the community remains helpful as it has always been. Stefan Also when looking through the fpGUI as well as the Freepascal repositories, there are just thousands of commits. looking at all those commits gives a real appreciation for the amount of work that has gone into the project. So a huge thank you goes out to everyone who has worked so hard to make freepascal as awesome as it is, as well as the people who are such a tremendous help on this list. Honestly if not for FreePascal, I would still be trying to put together Pentium 233 computers to run my old DOS applications on. (not fun, components are getting hard even to find on ebay now) I just don't have time to do a massive re-write all at once, and FreePascal let me drop in my Turbo Pascal programs and pretty much just run them. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On 2017-06-15 22:17, James Richters wrote: I specifically looked for agg_2d.pas (which is the one I was using) I found that it also was fixed, but only 11 months ago... after 1.4.1 was released. Yes, that's my bad. The agg_2d.pas unit was lagging behind for a while, because I never really used it until about 12-18 months ago. So mystery solved... but. We all love a mystery. ;-) It raises a new question... What is the difference between agg2D.pas and agg_2D.pas and which one do I want to be using? Yeah, probably not the best naming convention. The agg_2D.pas unit is a 100% non-GUI unit. It is meant for console or web (eg: CGI) style applications. No GUI toolkit dependencies are required. The "agg2D.pas" unit depends on fpGUI Toolkit, because it implements a fpGUI Canvas that uses AggPas for all it's 2D drawing routines. So it's a descendant of TfpgCanvasBase (a fpGUI class). Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On 2017-06-15 15:06, James Richters wrote: I don't like modifying units that are part of a package because then I would need to remember how I modified them when a new version is released or have to figure out what's going on all over again. I use Git for just about any source code I work with. I even let Git manage a SubVersion repository. I also often have my own "custom changes" in 3rd party code. With Git I simply create a "custom-mods" branch where I commit all my personal preferences. As the 3rd party code moves forward, I can move my whole "custom-mods" branch forward to by using the Git command "rebase". It's very little effort, and I have dragged some of my custom-mods branches forward since around 2010 (in various 3rd party code). 3) Make sure you always rebuild the unit depending on the program you want to compile (Compile -> Build). Is there a way to force this with the command line? Yes. The -B compiler command line parameter. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On 2017-06-15 13:34, Tomas Hajny wrote: Not quite - the text-mode IDE doesn't invoke fpc.exe binary (it has the compiler built-in) and it passes the options as defined in the respective IDE dialogs. Thanks Tomas for correcting me. I wasn't 100% sure about the behaviour of a compiled-in compiler. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
>And if you look in the "develop" branch of fpGUI, there is an even later >AggPas version - last updated a month ago I downloaded the fpGUI repository to have a look at it, and thought I would see if any of the things I was encountering with it were addressed yet. Sure enough, I found {$IFDEF AGG2D_USE_FREETYPE} {$UNDEF AGG2D_USE_WINFONTS} {$ENDIF} Already there, actually formatted exactly the way I did to get it to compile. So I went back in the history of the file to see when that was added, and I found it 4 years ago! This was really puzzling because I had to fix the version included with fpGUI 1.4.1 which was from 2015. Well looking more closely, I discovered there are 2 units... agg2D.pas and agg_2D.pas. well agg2D.pas is all the way at the bottom of all the agg_* units so I never knew it was there so when I specifically looked for agg_2d.pas (which is the one I was using) I found that it also was fixed, but only 11 months ago... after 1.4.1 was released. So mystery solved... but. It raises a new question... What is the difference between agg2D.pas and agg_2D.pas and which one do I want to be using? Also when looking through the fpGUI as well as the Freepascal repositories, there are just thousands of commits. looking at all those commits gives a real appreciation for the amount of work that has gone into the project. So a huge thank you goes out to everyone who has worked so hard to make freepascal as awesome as it is, as well as the people who are such a tremendous help on this list. Honestly if not for FreePascal, I would still be trying to put together Pentium 233 computers to run my old DOS applications on. (not fun, components are getting hard even to find on ebay now) I just don't have time to do a massive re-write all at once, and FreePascal let me drop in my Turbo Pascal programs and pretty much just run them. James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On Thu, June 15, 2017 16:06, James Richters wrote: . . >> 3) Make sure you always rebuild the unit depending on the program you >> want to compile (Compile -> Build). > > Is there a way to force this with the command line? (same as Compile > > build from the IDE) ? Yes, of course - it's the option '-B'. . . > Oh, I see the issue here. So If I were to write a unit that I wanted > Programs to share, but have various options, I may be better off to define > a variable in the unit and let the programs change the variable depending > on what they want with the compiler directives, it's actually leaving > out parts altogether, so you need to re-compile the unit if you want to > change it... makes smaller files than always including things you don't > want to use. . . Yes, exactly (plus there are some more reasons, like that you want to reduce unneeded dependencies which may not be fulfilled, etc.). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
On 15/06/17 17:45, Bernd Mueller wrote: On 06/15/2017 10:34 AM, Mark Morgan Lloyd wrote: Yes, but I was asking about the FPC situation. I'm desperately resisting local pressure to write code that might end up non-trivial in C/C++. I realized a project with an ATTiny1634. Nothing special: I used both UARTs (interrupt driven), had to handle a small shaft encoder and had to do a little bit banging on the GPIOs. All together, I used 6 Interrupts. For debugging, I implemented a third "soft-UART", which could send only. At any time, I could switch back to the pascal compiler, which I used over the last 17 years for AVR. But I am not going back, too much advantages on the fpc side to me :-) Thanks for that, encouraging. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
On 15/06/17 16:45, Karoly Balogh (Charlie/SGR) wrote: Hi, On Thu, 15 Jun 2017, Mark Morgan Lloyd wrote: At the risk of making myself unpopular: because right now I /don't/ have> time. Sorry, I didn't mean this personal to you. I was just a bit triggered onthe fact that people offer competing products on FPC status requests,because I've seen it more than once that people just ask for the Status ofX, regarding FPC, and when it's not there right now, they just move on tosomething else. And we have to "compete" with a whole range of commercialproducts, where this attitude doesn't help. I agree for what it's worth, and I also find it very frustrating when- in a mailing list specifically for FPC or Lazarus- somebody asks a question about the standard development environment or a standard component and gets the answer that the best way to do it is to use somebody else's pet project. Especially with a project as young and specialized as FPC's AVR backend.>> "Young and specialised"... exactly. Which is why I was interested in any> light that people currently working on AVR could throw on it, since> what's in the Wiki is roughly 9 months old (apart from recently-added> links etc.) and that's a long time for something which people are> actively working on. You are right, of course. I'm only using Arduinos at the moment (potentially including e.g. Teensy), and until I'm far more knowledgeable about remote debugging etc. am inclined to keep it that way :-) -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] X64 only - Can't determine which overloaded function to call
>have you tried 30.0 as well? it looks like something needs a real number for >this on the 64bit side... I have just now tried 30.0 and it compiles and runs fine with x64. I have also put the 30 back and changed the BYA and SYA variables to integers and it also works fine on x64. I just stuck the 30 in there to demonstrate the problem, my original program has a function call where the 30 is that returns an integer. I realize that there is no possible reason to want to round this with the variables supplied, the round was left over because I used to have a divide in the formula but ended up removing it but never removed the round() Still, I think this should compile successfully (useless as it is) anyway because there is technically nothing wrong with it. I can do Round(30), and Round(BYA) (BYA is a byte variable) successfully in both Win32 and Win64, so I don't know why this particular combination is a problem. I just now also tried LY:=Round(-(BYA+SYA)+30); //works both Win32 and Win64 Which is exactly the same thing as LY:=Round(30-(BYA+SYA)); //Does not work Win64 James -Original Message- From: fpc-pascal [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of wkitt...@windstream.net Sent: Thursday, June 15, 2017 2:03 PM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] X64 only - Can't determine which overloaded function to call On 06/15/2017 08:20 AM, James Richters wrote: > Strangely: > > LY:=Round(30.1-(BYA+SYA)); > > Also compiles fine with both Win32 and Win64 have you tried 30.0 as well? it looks like something needs a real number for this on the 64bit side... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Parallel Port Access with Free Pascal - windows
I have updated my unit for accessing parallel ports on Windows with Freepascal to now select the correct .dll file depending on how the program is compiled. It now uses inpout32.dll if you compile for Win32 inpoutx64.dll if you compile for Win64 I also added a new sample program that can be compiled for Win32 or Win64 which also demonstrates some of the other procedures and functions available. Here are links: here’s the link to the FPC sample files. https://github.com/Zaaphod/FPC-Parallel-Port The InpOut32 and InpOutx64 drivers are here: http://www.highrez.co.uk/downloads/inpout32/ James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] X64 only - Can't determine which overloaded function to call
On 06/15/2017 08:20 AM, James Richters wrote: Strangely: LY:=Round(30.1-(BYA+SYA)); Also compiles fine with both Win32 and Win64 have you tried 30.0 as well? it looks like something needs a real number for this on the 64bit side... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.* ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
Hi, On Thu, 15 Jun 2017, Mark Morgan Lloyd wrote: > At the risk of making myself unpopular: because right now I /don't/ have > time. Sorry, I didn't mean this personal to you. I was just a bit triggered on the fact that people offer competing products on FPC status requests, because I've seen it more than once that people just ask for the Status of X, regarding FPC, and when it's not there right now, they just move on to something else. And we have to "compete" with a whole range of commercial products, where this attitude doesn't help. > > Especially with a project as young and specialized as FPC's AVR backend. > > "Young and specialised"... exactly. Which is why I was interested in any > light that people currently working on AVR could throw on it, since > what's in the Wiki is roughly 9 months old (apart from recently-added > links etc.) and that's a long time for something which people are > actively working on. You are right, of course. Charlie ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
Thanks everyone for explaining this, and thanks for the various solutions. I don't like modifying units that are part of a package because then I would need to remember how I modified them when a new version is released or have to figure out what's going on all over again. > 3) Make sure you always rebuild the unit depending on the program you want to > compile (Compile -> Build). Is there a way to force this with the command line? (same as Compile > build from the IDE) ? >Defines have impact only when compiling the particular source code. Having a >'global define' in a program could never have impact to a unit which might be >already compiled using different defines at the moment the particular program >is compiled. Oh, I see the issue here. So If I were to write a unit that I wanted Programs to share, but have various options, I may be better off to define a variable in the unit and let the programs change the variable depending on what they want with the compiler directives, it's actually leaving out parts altogether, so you need to re-compile the unit if you want to change it... makes smaller files than always including things you don't want to use. >Yes, projects are 'a Lazarus thing'. However, you can achieve a similar effect >with local options and configuration files for the text-mode IDE (you just >need to use different directories for different 'projects'). Using directories sounds easy enough. >Alternatively you can pass @your.cfg to add a config. That's good to know, and could be useful! Since fp gets constantly re-saved when the IDE closes, it's possible that custom settings could be forgotten about and overwritten to not be there anymore. Using a custom cfg with this method would allow the changes to be kept separate and be a more obvious reminder that they need to happen. Can I add the custom config into the IDE someplace? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On Thu, 15 Jun 2017 07:57:14 -0400 "James Richters" wrote: > >The idea is that you have one project per program. You can compile them > >randomly without changing anything. > > I don't understand what you mean by 'one project per program' ? Project is a Lazarus/msegui thing. > I only have programs that I have sorted in sub directories. I normally use > the Freepascal text IDE to compile them, and sometimes the command line. I > might want to have ProgramA.pas have one define and ProgramB.pas have > another, both using the same unit, is there some method to do that? Yes, via the fpc.cfg, via @your.cfg, via include files, via FPC IDE config or by tools like Lazarus, msegui, make, etc. > >There are already many ways to add defines. Adding another one would make it > >harder for newbies. > Is there some method to make a global define that is in the program itself? > I don't see how having options available makes anything harder for anyone, > they can just not use such features. If someone else tries to understand your program he has to learn your way. Too many options for the same thing can be a burden. Especially when trying to find out why a macro was not defined. >[...] > Thanks for explaining that. It looks like I can define where my units are > with fpc.cfg as well and then I won't need to keep putting them on the > command line. If I put an fpc.cfg in a specific directory along with my > program to be compiled, will the one in that directory override the one in > \FPC\3.0.2\bin\i386-win32 ? fpc takes the first it finds. You can see where fpc searches for configs using the -vt flag. Alternatively you can pass @your.cfg to add a config. > I'm wondering if I am missing something with reference to 'projects' is that > a Lazarus thing? How are 'projects' defined? Many IDEs have "projects". Lazarus too. They contain build options and other stuff. The FPC IDE does not call it "project", but its local fpc.cfg, fp.ini and fp.dsk files have a similar purpose. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On Thu, June 15, 2017 13:57, James Richters wrote: >>The idea is that you have one project per program. You can compile them >> randomly without changing anything. > > I don't understand what you mean by 'one project per program' ? I only > have programs that I have sorted in sub directories. I normally use the > Freepascal text IDE to compile them, and sometimes the command line. I > might want to have ProgramA.pas have one define and ProgramB.pas have > another, both using the same unit, is there some method to do that? Yes: 1) Have sources of the two programs in different folders (directories) and start the text-mode IDE in the respective folder depending on the "project" / program you intend to build. 2) Set the compiler defines as necessary for the respective "project" (i.e. differently for ProgramA when started from directory of ProgramA and for ProgramB when started from directory of ProgramB) - Options -> Compiler -> Conditional defines. By default, the configuration is automaticaly saved when exiting the IDE. 3) Make sure you always rebuild the unit depending on the program you want to compile (Compile -> Build). Obviously, this requires the source file of the unit to be available for the compiler (i.e. in one of paths in Options -> Directories -> Unit directories). >>There are already many ways to add defines. Adding another one would make >> it harder for newbies. > Is there some method to make a global define that is in the program > itself? I don't see how having options available makes anything harder > for anyone, they can just not use such features. The hard thing is for the user to understand differences among the available options and their implications. Defines have impact only when compiling the particular source code. Having a 'global define' in a program could never have impact to a unit which might be already compiled using different defines at the moment the particular program is compiled. One of possible solutions for this is having a 'global include file' which is included in all the relevant units and the program, the other is outlined above (defines stored in the compiler / IDE configuration file). >>If you want a compiler define for all projects, then simply add that >> define in your fpc.cfg file. That is a "global options" file. I trust >> those will take effect even if you use the FPC Text IDE, because it is >> the fpc.exe binary that reads the fpc.cfg file and gets default settings >> from there. Not quite - the text-mode IDE doesn't invoke fpc.exe binary (it has the compiler built-in) and it passes the options as defined in the respective IDE dialogs. > Thanks for explaining that. It looks like I can define where my units are > with fpc.cfg as well and then I won't need to keep putting them on the > command line. If I put an fpc.cfg in a specific directory along with my > program to be compiled, will the one in that directory override the one in > \FPC\3.0.2\bin\i386-win32 ? Yes (if starting the _compiler_ in that directory). If using the IDE, you can do the same with the fp.cfg file. > I'm wondering if I am missing something with reference to 'projects' is > that a Lazarus thing? How are 'projects' defined? Yes, projects are 'a Lazarus thing'. However, you can achieve a similar effect with local options and configuration files for the text-mode IDE (you just need to use different directories for different 'projects'). Hope this helps Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] X64 only - Can't determine which overloaded function to call
I have two almost identical programs, but one of them I cannot compile with Win64, but it works fine with Win32. I finally figured out that the difference between the two that seemed to make a difference was the working one had constants defined, the one with issues, those constants were changed to variables. I've managed to reduce it down to the offending line and made some test programs that demonstrate the issue: This program runs fine with both Win32 and Win64: Const BYA=5; SYA=10; Var LY:word; Begin LY:=Round(30-(BYA+SYA)); End. This program will only compile with Win32. With Win 64 I get: testit.pas(7,5) Error: Can't determine which overloaded function to call. Var LY:word; BYA,SYA:Byte; Begin BYA:=5; SYA:=10; LY:=Round(30-(BYA+SYA));//This is the line producing the error, but why? End. I'm very confused by this. It's very clear what to do, and as far as I know, valid syntax. If I use LY:=Round(30-BYA-SYA); Then it is compiled by both Win32 and Win64 fine. But this is not what I always want to do, I have reasons to want it (30-(BYA+SYA)) the original formula was very long, I reduced it down to this one thing that causes the problem, I really need to be able to group things the way I want to group them. Strangely: LY:=Round(30.1-(BYA+SYA)); Also compiles fine with both Win32 and Win64 I am compiling 32bit version with: fpc testit.pas And compilng 64bit verion with: fpc -Px86_64 testit.pas Any ideas about this? James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
Am 15.06.2017 um 14:10 schrieb Mark Morgan Lloyd: > On 15/06/17 11:30, Karoly Balogh (Charlie/SGR) wrote: >> Hi, >> On Thu, 15 Jun 2017, Mark Morgan Lloyd wrote: mikroPascal (not free) supports AVR and many other chips.> > https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license> > Brian>> Yes, but I was asking about the FPC situation. I'm desperately resisting> local pressure to write code that might end up non-trivial in C/C++. >> Well, FPC is an open source project, which means without communityfeedback >> and contribution, it >> won't improve, or would, but much slower. :) >> So if you have time, how about you try if it works for >> yourusecase/platform/etc, and at least give >> feedback on it? Even if it didn'twork, if you run into issues you're unable >> to solve, and share >> them, itmight be helpful for the developers. And I'm sure some of the issues >> you'dencounter could >> be fixed overnight, if the devs would know it's a blockerfor someone's >> actual usecase. > > At the risk of making myself unpopular: because right now I /don't/ have time. I risk the same: mail less, code more :> ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
On 15/06/17 11:30, Karoly Balogh (Charlie/SGR) wrote: Hi, On Thu, 15 Jun 2017, Mark Morgan Lloyd wrote: mikroPascal (not free) supports AVR and many other chips.> > https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license> > Brian>> Yes, but I was asking about the FPC situation. I'm desperately resisting> local pressure to write code that might end up non-trivial in C/C++. Well, FPC is an open source project, which means without communityfeedback and contribution, it won't improve, or would, but much slower. :) So if you have time, how about you try if it works for yourusecase/platform/etc, and at least give feedback on it? Even if it didn'twork, if you run into issues you're unable to solve, and share them, itmight be helpful for the developers. And I'm sure some of the issues you'dencounter could be fixed overnight, if the devs would know it's a blockerfor someone's actual usecase. At the risk of making myself unpopular: because right now I /don't/ have time. And part of the reason that my colleagues and I are seriously short of time is that we've put far too much of it over the years into trying to work around problems in various open source projects on various architectures, starting off with Debian on SPARC and heading off in even more arcane directions. And that /does/ include FPC. Especially with a project as young and specialized as FPC's AVR backend. "Young and specialised"... exactly. Which is why I was interested in any light that people currently working on AVR could throw on it, since what's in the Wiki is roughly 9 months old (apart from recently-added links etc.) and that's a long time for something which people are actively working on. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
>The idea is that you have one project per program. You can compile them >randomly without changing anything. I don't understand what you mean by 'one project per program' ? I only have programs that I have sorted in sub directories. I normally use the Freepascal text IDE to compile them, and sometimes the command line. I might want to have ProgramA.pas have one define and ProgramB.pas have another, both using the same unit, is there some method to do that? >There are already many ways to add defines. Adding another one would make it >harder for newbies. Is there some method to make a global define that is in the program itself? I don't see how having options available makes anything harder for anyone, they can just not use such features. >If you want a compiler define for all projects, then simply add that define in >your fpc.cfg file. That is a "global options" file. I trust those will take >effect even if you use the FPC Text IDE, because it is the fpc.exe binary that >reads the fpc.cfg file and gets default settings from there. Thanks for explaining that. It looks like I can define where my units are with fpc.cfg as well and then I won't need to keep putting them on the command line. If I put an fpc.cfg in a specific directory along with my program to be compiled, will the one in that directory override the one in \FPC\3.0.2\bin\i386-win32 ? I'm wondering if I am missing something with reference to 'projects' is that a Lazarus thing? How are 'projects' defined? James -Original Message- From: fpc-pascal [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Mattias Gaertner Sent: Thursday, June 15, 2017 6:55 AM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Implementing AggPas with PtcGraph On Thu, 15 Jun 2017 06:37:41 -0400 "James Richters" wrote: >[...] > I see, thanks for explaining. For some reason, I was thinking it was > optional to put it in the compiler, but I could also put it in the program. > Is there no way to set a global define in each program so I could have > several programs defined differently and randomly compile them without > changing any settings? The idea is that you have one project per program. You can compile them randomly without changing anything. > It seems some method of doing that would be very useful... but maybe not easy > to implement... I suppose it probably compiles all the units first then the > main program, so putting anything in the main program wouldn't be seen until > it was too late. There are already many ways to add defines. Adding another one would make it harder for newbies. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On 2017-06-15 11:37, James Richters wrote: Maybe include Freetype32.dll and Freetype64.dll to make it very clear. That was exactly what I had in mind. the program. Is there no way to set a global define in each program so I could have several programs defined differently and randomly compile them without changing any settings? If you want a compiler define for all projects, then simply add that define in your fpc.cfg file. That is a "global options" file. I trust those will take effect even if you use the FPC Text IDE, because it is the fpc.exe binary that reads the fpc.cfg file and gets default settings from there. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
Hi, On Thu, 15 Jun 2017, Mark Morgan Lloyd wrote: > > mikroPascal (not free) supports AVR and many other chips. > > https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license > > Brian > > Yes, but I was asking about the FPC situation. I'm desperately resisting > local pressure to write code that might end up non-trivial in C/C++. Well, FPC is an open source project, which means without community feedback and contribution, it won't improve, or would, but much slower. :) So if you have time, how about you try if it works for your usecase/platform/etc, and at least give feedback on it? Even if it didn't work, if you run into issues you're unable to solve, and share them, it might be helpful for the developers. And I'm sure some of the issues you'd encounter could be fixed overnight, if the devs would know it's a blocker for someone's actual usecase. Especially with a project as young and specialized as FPC's AVR backend. Charlie ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
On 15/06/17 11:15, Rainer Stratmann wrote: Am Donnerstag, 15. Juni 2017, 08:34:49 schrieb Mark Morgan Lloyd:> On 14/06/17 20:15, Brian wrote:> > mikroPascal (not free) supports AVR and many other chips.> > https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license> > Brian> > Yes, but I was asking about the FPC situation. I'm desperately resisting> local pressure to write code that might end up non-trivial in C/C++. As far as I know there is not ab FPC solution by now. http://wiki.lazarus.freepascal.org/AVR http://wiki.lazarus.freepascal.org/AVR_Programming -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
Am Donnerstag, 15. Juni 2017, 08:34:49 schrieb Mark Morgan Lloyd: > On 14/06/17 20:15, Brian wrote: > > mikroPascal (not free) supports AVR and many other chips. > > https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license > > Brian > > Yes, but I was asking about the FPC situation. I'm desperately resisting > local pressure to write code that might end up non-trivial in C/C++. As far as I know there is not ab FPC solution by now. I have Mikropascal for AVR and it works good. All the projects I do with with it. They also have an ARM Pascal compiler which works fine. 4k Byte code for AVR and 8k Byte code for ARM is free. You can download it for free. I have a USB dongle Version here. > > -- > Mark Morgan Lloyd > markMLl .AT. telemetry.co .DOT. uk > > [Opinions above are the author's, not those of his employers or colleagues] > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On Thu, 15 Jun 2017 06:37:41 -0400 "James Richters" wrote: >[...] > I see, thanks for explaining. For some reason, I was thinking it was > optional to put it in the compiler, but I could also put it in the program. > Is there no way to set a global define in each program so I could have > several programs defined differently and randomly compile them without > changing any settings? The idea is that you have one project per program. You can compile them randomly without changing anything. > It seems some method of doing that would be very useful... but maybe not easy > to implement... I suppose it probably compiles all the units first then the > main program, so putting anything in the main program wouldn't be seen until > it was too late. There are already many ways to add defines. Adding another one would make it harder for newbies. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
>True. I'll include a 64-bit version too. That would be great, because I don't have a clue where this 64bit version I found came from, what version it is, and things like that. Maybe include Freetype32.dll and Freetype64.dll to make it very clear. >That is why I said you must put it in your Project's Compiler Settings instead >using your IDE of choice >(or via the command line when calling fpc.exe binary). That way the define is >active for all units of your project. I see, thanks for explaining. For some reason, I was thinking it was optional to put it in the compiler, but I could also put it in the program. Is there no way to set a global define in each program so I could have several programs defined differently and randomly compile them without changing any settings? It seems some method of doing that would be very useful... but maybe not easy to implement... I suppose it probably compiles all the units first then the main program, so putting anything in the main program wouldn't be seen until it was too late. James -Original Message- From: fpc-pascal [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Graeme Geldenhuys Sent: Thursday, June 15, 2017 3:19 AM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Implementing AggPas with PtcGraph On 2017-06-15 02:40, James Richters wrote: > That is what I thought should happen, but I put {$DEFINE > AGG2D_USE_FREETYPE} > > I don't know why the define isn't making it to the unit. Do I need to > do something else? Compiler defines defined with the $DEFINE directive is per unit only. That is why I said you must put it in your Project's Compiler Settings instead using your IDE of choice (or via the command line when calling fpc.exe binary). That way the define is active for all units of your project. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC for AVR
On 14/06/17 20:15, Brian wrote: mikroPascal (not free) supports AVR and many other chips. https://shop.mikroe.com/compilers/mikropascal/avr-electronic-license Brian Yes, but I was asking about the FPC situation. I'm desperately resisting local pressure to write code that might end up non-trivial in C/C++. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On 2017-06-15 02:55, Stefan V. Pantazi wrote: I think you need to use a global define passing a -d??? parameter (-dAGG2D_USE_FREETYPE) to the compiler. Just adding it to a unit only defines for that unit The above statement is 100% correct. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Implementing AggPas with PtcGraph
On 2017-06-15 02:40, James Richters wrote: That is what I thought should happen, but I put {$DEFINE AGG2D_USE_FREETYPE} I don't know why the define isn't making it to the unit. Do I need to do something else? Compiler defines defined with the $DEFINE directive is per unit only. That is why I said you must put it in your Project's Compiler Settings instead using your IDE of choice (or via the command line when calling fpc.exe binary). That way the define is active for all units of your project. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal