#### Archived

This topic is now archived and is closed to further replies.

# Nasty Compile errors on each project i try :p

This topic is 5987 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey all, i was wondering if you guys could help a newby like me out of a nasty situation :/ I think i found a pretty nifty tutorial site through the Turbo links, but i keep getting the same compile errors with every project i use there. The problem is with pixelsdx.pas , in the function Dxsurfacelock i keep erorring @ if TheSurface.Lock( @LockRect, TheSurfaceDesc, DDLOCK_SURFACEMEMORYPTR+DDLOCK_WAIT, 0 )<>DD_OK then Result:=False; with the message : Incompatible Types : ''TDDSurfaceDesc2'' and ''TDDSurfaceDesc2'' --- I tried to find what it actually was but due to my newbyness i just get frustrated by it... Might any of you have an idea what''s causing this ? http://www.multimania.com/jdelauney/dxgeissfx.zip is the source of the project i''m trying to compile... (it''s not just this example but with all the projects i found on that website...) Does anyone have an idea ? and if he does : how to fix it and what is actually wrong ? so i can learn from it... --- Greets!

##### Share on other sites
I had the same problem too so I can''t help you, but at least you know its not just you sorry

Bobby

##### Share on other sites
There HAS to be a way )

btw, you guys on a irc chat somewhere ?

##### Share on other sites
Well,

When I upgraded to some of the these versions of the DelphiX library I also encountered this error. It seems that some folks thought it was ok to go tinkering around with the DelphiX Classes itself without extensive testing.

My fix was to do a "clean" install of a trusted DelphiX library.

Note: I have found the Turbo DelphiX code to be quite stable.

##### Share on other sites
I'm not sure from the error message, but usually I'd expect the error to look like:

"Incompatible Types : 'T DDSurfaceDesc2' and 'P DDSurfaceDesc2'"
or
"Incompatible Types : 'P DDSurfaceDesc2' and 'T DDSurfaceDesc2'"

Or something like that, in that case you should try:

if TheSurface.Lock( @LockRect, TheSurfaceDesc^ , DDLOCK_SURFACEMEMORYPTR+DDLOCK_WAIT, 0 )<>DD_OK then Result:=False;

or

if TheSurface.Lock( @LockRect, @TheSurfaceDesc , DDLOCK_SURFACEMEMORYPTR+DDLOCK_WAIT, 0 )<>DD_OK then Result:=False;

Depending on the actual problem, that might fix everything for you.

Alternatively... look for a different pixel handler, like those provided by turbo:

turboPixels v1.2
or
PixelCore for DelphiX

At the very least you can learn from those examples how other programmers handle the same problem... GooDLucK

Henri aka A-Lore

Edited by - LoreKeeper on February 24, 2002 8:44:45 AM

##### Share on other sites
Just a thought:
One of yor addin units might be declaring its own TDDSurfaceDesc2, such that:

unit UnitA;interfacetype     TMyClass=class    {something}    end;function func(MyClass:TMyClass);implmentationend.

unit UnitB;interfacetype     TMyClass=class    {something}    end;implmentationend.

//My programuses UnitA,UnitB;

In your program the type UnitB.MyClass is used whenever you declare something as MyClass, however UnitA.Func requires a UnitA.MyClass. The same thing could also be happening on a deeper level (within one of the units being used)

1. 1
Rutin
21
2. 2
3. 3
JoeJ
18
4. 4
5. 5

• 13
• 38
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631714
• Total Posts
3001867
×