[fpc-pascal] Implementing AggPas with PtcGraph

James Richters james at productionautomation.net
Wed Jun 14 00:17:48 CEST 2017


>Looks like it may be something specific to your setup. In my tests I used Lazarus 1.5 as IDE and fpc 3.0.1 on Linux. Crosscompiled example ran on Win7 64 bit. 
>So there are already differences with your environment. Noting your problems with compilation, you may want to consider using Lazarus IDE as well. You get a debugger too.
I have pretty much a stock freepascal installation.  I very recently installed fpc-3.0.2.i386-win32.exe.  Then I installed fpc-3.0.2.i386-win32.cross.x86_64-win64.exe.  Then to get AggPas to work I copied everything from the 'src' folder in AggPas24-rm3.zip to an AggPas folder under FPC\3.0.2\units\i386-win32 and FPC\3.0.2\units\x86_64-win64. Everything compiles successfully, and other programs run, so it's very strange.

I tried Lazarus before and was unable to even get started with It because I could not even compile my console applications.  I think maybe it's because most of them require turbo pascal compatible mode and I don't think I knew about {$mode tp} directive yet.  So maybe I'll give it another try.    I like the debugger in the textmode IDE, but that doesn't help with this issue where everything is fine in win32 but not in x64. 

>One other thing that comes to mind is to be mindful of calls like this
>
>  agg^.rectangle(0, 0, IMAGE_WIDTH, IMAGE_HEIGHT);
>If the default fill color is black, then the result will be a black window, albeit not unresponsive. Again, if your program hangs for some reason, a debugger may come in handy.

I had the color set to blue, I get the blue rectangles, but there is this huge delay (6 seconds) in the x64 version but no delay in the win32 version.  The black screen was before I inserted the rectangles in.

James





More information about the fpc-pascal mailing list