Forum > Unix

External variable compilation error

(1/2) > >>

Roland57:
Hello!

I try to compile a program that I didn't written. I have a problem with thee two lines:


--- 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";}};} ---var  stdout: pointer; {$ifdef linux}external libc;{$endif}  stdin: pointer; {$ifdef linux}external libc;{$endif}
I get this error message, that I don't know how to solve:

--- Quote ---uSystem.pas(45,43) Fatal: Syntax error, ":" expected but "identifier LIBC" found
--- End quote ---

Would someone have a suggestion?


Roland57:
I have just seen that there is an *.inc with 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";}};} ---{$ifdef linux}  const    libc = 'c';    fmt64 = 'll';{$else}

marcov:
look up cvar in the documentation

Fred vS:
Hello Roland.

This compiles ok here:


--- 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";}};} ---program testvar; {$mode objfpc}{$H+} var  stdin: pointer; external 'libc.so.6';  stdout: pointer; external 'libc.so.6';  beginend.

Roland57:

--- Quote from: marcov on October 29, 2020, 08:20:50 pm ---look up cvar in the documentation

--- End quote ---

Thank you for your answer.

I tried 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";}};} ---var  hConsole: THandle;  stdout: pointer; {$ifdef linux}cvar; external libc;{$endif}  stdin: pointer; {$ifdef linux}cvar; external libc;{$endif}
and also 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";}};} ---var  hConsole: THandle;  stdout: pointer; {$ifdef linux}cvar; external;{$endif}  stdin: pointer; {$ifdef linux}cvar; external;{$endif}
without success.  :-\

Navigation

[0] Message Index

[#] Next page

Go to full version