Hello,
Have a look at the commandline options:
Code:
Quick Help:
-----------
pbcompiler "filename.pb"
Options:
--------
...
-e or --executable "filename": Create an executable to the given filename
...
If you change your code, you can see, that the passed parameters are wrong:
Code:
EnableExplicit
Define FileChoose$, Parameter$, myProg
FileChoose$ = OpenFileRequester("", "", "*.pb", 0)
MessageRequester("choosen file", FileChoose$) ; #############
Parameter$ = #DQUOTE$+"--executable"+#DQUOTE$+#DQUOTE$+FileChoose$+#DQUOTE$
Debug Parameter$
myProg = RunProgram(#PB_Compiler_Home + "compilers/pbcompiler", Parameter$, "", #PB_Program_Open)
Debug myProg
While ProgramRunning(myProg)
Debug "program running"
Wend
Debug "runprogram finished"
Result of Parameter$:
Code:
"--executable""/path/to/source-code.pb"
Solution: Change your code, so that the Result of Parameter$ looks like this:
Code:
--executable "/path/to/new-executable" "/path/to/source-code.pb"
If you will pass this as Parameter to RunProgram, it should work.
cu,
guido