Madshi and Lazarus?

delphi package - madRes, madTools, madStrings, ...

Madshi and Lazarus?

Postby gonzo » Sat Oct 17, 2009 1:00 pm

Hi all
How can i use Madshi with free object pascal compiler Lazarus?
Please help me :sorry:

EDIT:

Error after compilation:
http://img18.imageshack.us/i/coded.jpg/

Next i do this:
http://img5.imageshack.us/i/code2n.jpg/

Error after compilation:
http://img291.imageshack.us/i/code3x.jpg/

What is wrong? How can i do this? Please help me :cry:
gonzo
 
Posts: 4
Joined: Sat Oct 17, 2009 12:56 pm

Postby madshi » Mon Oct 19, 2009 6:56 am

Seems that Lazarus can't find madRes.pas. Don't know why. Check the Lazarus paths. The file should be there. About the madTypes.pas complaint: Did you edit madTypes.pas somehow? Lazarus complains about line 80 redefining TAString. But line 80 doesn't contain TAString, it contains TAWideString.
madshi
Site Admin
 
Posts: 9273
Joined: Sun Mar 21, 2004 5:25 pm

Postby gonzo » Wed Oct 21, 2009 2:01 pm

"Seems that Lazarus can't find madRes.pas. Don't know why. Check the Lazarus paths. The file should be there."

To which path to copy madRes.pas? Just copying the folder with my project.


"About the madTypes.pas complaint: Did you edit madTypes.pas somehow? Lazarus complains about line 80 redefining TAString. But line 80 doesn't contain TAString, it contains TAWideString."

Yes, I tried. Original madTypes.pas now copied to the folder of my project and compiled:

http://img202.imageshack.us/i/error123321.jpg/

Thank you for your reply
gonzo
 
Posts: 4
Joined: Sat Oct 17, 2009 12:56 pm

Postby madshi » Wed Oct 21, 2009 3:50 pm

gonzo wrote:To which path to copy madRes.pas?

I don't really know. I've no experience with Lazarus. I don't know where it expects the source code. Maybe the easiest way out would be to copy madRes.pas to your project folder.

gonzo wrote:Yes, I tried. Original madTypes.pas now copied to the folder of my project and compiled: [...]

I think that's a bug in Lazarus. But anyway, you can probably work around that by changing the "shr 2" to "shr 3" or "shr 4".
madshi
Site Admin
 
Posts: 9273
Joined: Sun Mar 21, 2004 5:25 pm

Postby gonzo » Wed Oct 28, 2009 4:56 pm

gonzo wrote:Yes, I tried. Original madTypes.pas now copied to the folder of my project and compiled: [...]

I think that's a bug in Lazarus. But anyway, you can probably work around that by changing the "shr 2" to "shr 3" or "shr 4".[/quote]

I change:
" TAString = array [0..maxInt shr 2-1] of string;"
to:
" TAString = array [0..maxInt shr 3-1] of string;"
and

" TAString = array [0..maxInt shr 4-1] of string;"

And isn't work "madTypes.pas(78,56) Error: Data element too large
" :sorry:
gonzo
 
Posts: 4
Joined: Sat Oct 17, 2009 12:56 pm

Postby madshi » Wed Oct 28, 2009 7:50 pm

Well, then simply replace it with "array [0..100000]" or something. In the worst case you can replace it with "array [0..0]". The reason why madTypes tries to define the arrays as large as possible is that this way you can avoid superfluous compiler warnings when doing pointer math with these types...
madshi
Site Admin
 
Posts: 9273
Joined: Sun Mar 21, 2004 5:25 pm

Postby gonzo » Tue Nov 10, 2009 9:58 pm

It's still wrong :? Can u tell me, is Turbo Delphi compatible with madshi? Maybe U know that ? Sorry for my bad English :confused:
gonzo
 
Posts: 4
Joined: Sat Oct 17, 2009 12:56 pm

Postby madshi » Mon Nov 16, 2009 6:16 pm

The free Turbo Delphi edition doesn't accept any 3rd party precompiled DCUs, so it's not compatible with the commercial madCollection packages. You could manually recompile the freeware madCollection packages with the free Turbo Delphi edition, though.
madshi
Site Admin
 
Posts: 9273
Joined: Sun Mar 21, 2004 5:25 pm


Return to madBasic

Who is online

Users browsing this forum: No registered users and 2 guests