Yes, I used the popen example.

I tried compiling the code u sent, and I'm getting errors. I use quincy2005 
which uses the mingw compiler. errors are:
"
23: error 'vsprintf_s' was not declared i this scope
52: error 'sprintf_s' was not declared in this scope
"

the popen example works great. its only when i try to change it that I'm 
getting problems.

try this and see if it works on your machine:
download avra.exe (avr assembler) http://sourceforge.net/projects/avra

put that in the same folder as your .exe and call it from within the program 
using this:
"avra.exe test.asm"
when it tries to compile, it'll show the avra stuff in the GUI, however, the 
error will show in the console something like "test.asm: file does not exist"

Now that's if the file doesn't exist. but even if it does and there are no 
errors, avra outputs "pass 1..." in the GUI window, but everything below that 
shows up in the DOS window, "pass 2..." etc. If there are any errors in 
compilation, those will also show up in the console window.

That's just one program I'm calling. The other program I'm calling will show 
show nothing in the GUI window, but everything in the console. regardless of if 
its job was successful or not.

Thanks for your help, I REALLY appreciate it.

Adam


> Greg Ercolano wrote:
> > adam wrote:
> >> I'm looking for a function similar to the wxExecute function. 
> >> http://www.wxwidgets.org/wiki/index.php/WxExecute  this allows you to do 
> >> command line stuff without using the command line.
> >>
> >> I've tried using the popen example from Greg Ercolano, but its not working.
> >
> >     What problem are you having?
> >
> >     I just compiled it again on my Visual Studio 6 and it ran fine. [..]
>
>     BTW, I'm assuming you mean this example:
>     http://seriss.com/people/erco/fltk/#add_fd
>
>     ..and /not/ this other one, which also uses popen, but is unix only:
>     http://seriss.com/people/erco/fltk/#mkfifo
>
>     Life will definitely be easier if you use popen(), because then
>     you don't have to use threads.. add_fd() does all the work for you.
>     add_fd() only works with the unixy 'file descriptors' returned by
>     calls like popen/fopen/open/etc. add_fd() /won't/ work with
>     CreatePipe()/CreateFile(), because Microsoft wanted to be different.
>
>

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to