> In Bach, Perl, can do set SDL_VER=`sdl-config --version`
> But in Pascal non have the setenv() procedure as in C :(
> ...
> Actualy I resolve this problem with sending the output to a file, and
> then reading the file.

It sounds to me like you just want a global
variable, not an environment variable.

Maybe something like this?

(************************************)
program sdlver;

uses libc;

type
  SDL_version = record
    major : byte;
    minor : byte;
    patch : byte;
  end;
  pSDL_version = ^SDL_version;

function SDL_Linked_Version:pSDL_version; cdecl; external 'SDL';

var
  SDL_VER:array[0..15] of char;

begin
  with SDL_Linked_Version^ do sprintf(SDL_VER, '%d.%d.%d', [major, minor, patch]);
  WriteLn(SDL_VER);
end.
(************************************)


Regards,
 - Jeff

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to