Compiled_LastCompile_Output

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC and External Compilers interop >

Compiled_LastCompile_Output

 

Description

 

Returns the text summary of compilation of code within #Compiled / #EndCompiled sections, if any.

 

Syntax

 

s = Compiled_LastCompile_Output

 

Returns

 

String, compiler output

 

Remarks

 

Your code needs to contain #Compiled / #EndCompiled in order to create the DLL.

 

Restrictions

 

See also

 

Examples

 

'---Create an FBCode block telling ThinBASIC not to call internal runtime 

'---error window in case of FreeBASIC compile error

'---In this case programmer wants to manage compile error from script

#Compiled SuppressRTE Language = FreeBasic

 

  sub SayHelloFromFreeBasic cdecl (byref sDLLFileName as zstringExport

    print "Hi there. I'm a compiled code."

    print "I'm a FreeBasic Sub compiled inside " & sDLLFileName

  end sub

  

#EndCompiled

 

uses "Console"

 

'---Check if FreeBASIC compile was ok

if CompiledCode_LastCompile_Result = 0 Then

  SayHelloFromFreeBasic(Compiled_DLL_FileName)

  printl "Now I'm printing from thinBasic script"

 

Else

  '---Something happened during FreeBASCI compile

  printl "FreeBASIC compile error" in %CCOLOR_FLIGHTRED

  printl

  printl Compiled_LastCompile_Output

end If

 

WaitKey