Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
Hello. Sorry to come back with that story... ;-( I have used inside a script LD_LIBRARY_PATH` and at end runs the espeak executable. So a Tprocess run the script. Ok, it works but... now i do not have access to espeak anymore, not possible to cancel the speech. AProcess.terminate has impact

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread Ewald
On 06/20/2015 09:05 AM, fredvs wrote: Hello. Sorry to come back with that story... ;-( I have used inside a script LD_LIBRARY_PATH` and at end runs the espeak executable. So a Tprocess run the script. Why use a script? When you exec(), a parameter is available to set the environment

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
Re_hello. Huh, i am loosed... Here the working script run by TProcess (but that cannot be canceled)= #!/bin/sh LIBPORTAUDIO=libportaudio.so #portaudio library ESPEAKBIN=espeak #espeak binary CALLDIR=${0%/*}/#

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
@ Giuliano = thanks for advice ;-) Hum, finally, using = AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio_x64.so' ; It works ;-) ( was a wrong character...) So, many, many thanks, i get the solution. Many thanks to everybody. Fre;D - Many

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
@ Ewald = many thanks for your help. Your advices are very promising... I will test it and write later the result. Write you soon. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/loadlibrary-unsafe-tp5721801p5721865.html Sent

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread Giuliano Colla
Il 20/06/2015 17:11, fredvs ha scritto: Re-re-re-Hello. This one does not work too ;-( = - AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio.so' ; ??? Many thanks. Have you tried: AProcess.Environment.Text :=

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
Re-re-re-Hello. This one does not work too ;-( = - AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio.so' ; ??? Many thanks. Fre;D - Many thanks ;-) -- View this message in context:

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread waldo kitty
On 06/20/2015 11:11 AM, fredvs wrote: Re-re-re-Hello. This one does not work too ;-( = - AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio.so' ; how many sak are there really? you have two plus sakit... this is the first you've posted anything of your

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
@ Waldo = thanks for help. ;-) But TProcess.Environment kills the script... No script needed anymore ;-) The script will become a program.ini... = Works perfectly. TProcess.Environment.Text := 'LD_PRELOAD='/the/directory/of/thelibrary.so' ; = And now, canclel_speech (= TProcess.terminate)

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-12 Thread Mark Morgan Lloyd
fredvs wrote: @ Ewald and Mark = thanks for answer. ;-) Yep, i agree, the process is exotic but works so good. I have to agree too, following Martin Schreiber way: = export LD_PRELOAD=$LIBPORTAUDIO, before to run the executable works too. And is maybe safer. And do not need dynlibs in uses

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-12 Thread fredvs
@ Ewald and Mark = thanks for answer. ;-) Yep, i agree, the process is exotic but works so good. I have to agree too, following Martin Schreiber way: = export LD_PRELOAD=$LIBPORTAUDIO, before to run the executable works too. And is maybe safer. And do not need dynlibs in uses section. And no

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-12 Thread Ewald
On 06/10/2015 01:20 PM, fredvs wrote: To do run the program = - first dynamic load portaudio with loadlibrary('/the_path_you_want/libportaudio.so'). - run the executable via TProcess (espeak). I must admit this is a creative way of solving this particular issue :-) I wonder if you have

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-12 Thread Mark Morgan Lloyd
fredvs wrote: - For [...], the eSpeak source produces a executable without static espeak-library nor static portaudio-library included in executable. So both espeak-library and portaudio-library must be installed in library path of the system. If libraries are not installed in library path

[fpc-pascal] loadlibrary() unsafe ?

2015-06-11 Thread fredvs
Hello. Here the thing: a open-source program, eSpeak (voice synthezer) uses 2 libraries: espeak-library and portaudio. In eSpeak source = - For the Windows version, the libraries are included in the executable (static linked). To do run the program = it is easy = just run the executable via

[fpc-pascal] loadlibrary() unsafe ?

2015-06-11 Thread Fred van Stappen
Hello. Here the thing: a open-source program, eSpeak (voice synthezer) uses 2 libraries: espeak-library and portaudio. In eSpeak source = - For the Windows version, the libraries are included in the executable (static linked). To do run the program = it is easy = just run the