Forum > macOS / Mac OS X

onguard wont compile (mac)

(1/2) > >>

Michael Collier:
Hi

I get compilation errors compiling onguard (from online package manager) on Mac, but compiles on linux & windows.

Has anyone used onguard with Mac?

Thanks,
Mike

Thaddy:
Can you show the exceptions?
I don't use OnGuard anymore, but I know the code quite well.

Michael Collier:
I think the problem relates to the use of {$IFDEF xxx}, the error is forward declaration is not solved.

In package tponguard.lpk (not sure about other packages e.g. tponguard_design etc.) unit ogutil

at line 236 (in the interface section) refers to (not)WINDOWS i.e. DARWIN will find this..

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$IFNDEF WINDOWS}function GetDiskSerialNumber(Drive : AnsiChar) : LongInt;function MyHashElf(const Buf;  BufSize : LongInt) : LongInt;{$ENDIF}  
at line 396 (implementation) refers to LINUX (so missing from DARWIN)

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$IFDEF LINUX}function GetDiskSerialNumber(Drive : AnsiChar) : LongInt; 
I tried a few hacks to see if it would compile using {$IFDEF DARWIN} on my MacOS machine and IIRC it managed to compile, but then reverted the code back (IIRC I then had problems compiling in LINUX which considering this was a hack, was no surprise).

I think I changed 3 {$IFDEF} statements to get it to compile under DARWIN.

Probably worth a shot fixing it (I didn't know enough about the code), I'm happy to test (LINUX, WINDOWS,DARWIN).

Thaddy:
Try to change it to Unix instead of Linux.

Michael Collier:
I changed LINUX to UNIX, I can see from MacOS editor that the code becomes 'visible'.

When I compile I get error that HiWord not found, likely because another {$IFDEF} statement needs changing.

I'll take a look later at the package as a whole and see what can be done, thanks..

Navigation

[0] Message Index

[#] Next page

Go to full version