> CIB wrote
> When compiling a fltk program with MinGW, I'm suffering two problems.. The 
> first is that no output to stdout will work, a printf at the start of the 
> program will simply output nothing.
>

The real problem here is that, unless you specify the application as a console 
app (and you probably don't want to do that, the application will run in the 
Background if launched from a DOS box.

However, there are two ways around this.
1. Pipe the output from the application into a file

application_name.exe > logfile.txt

The printfs will appear in the file. Sadly you'll only be able to look at them 
after you close the application.

Much better is :-

2. Use MSys as well as MinGW. In the MSys bash shell, the application will run 
in the foreground unless you background it by following the command with &

I use this all the time and printfs appear in the MSys shell environment 
without making the application a console app.

One further note: Make sure you flush each printf statement using
fflush(stdout);
as windows will not automatically flush the stdout buffer until it's full or 
you close the application.


>
> The second is that gdb will crash. When starting the program in gdb, it will 
> simply exit with a runtime error. I figure this is a bug in gdb, but since 
> I'm only getting it with fltk apps, it's likely connected to a problem with 
> FLTK, too. This problem even occurs with the fltk demo apps, so it's either a 
> general problem with FLTK, or something going wrong with my build environment.

I can't imagine what is causing this runtime error problem.
I use gdb-5.2.1 from the MSys shell without any problems.
Again, if you don't use MSys then try that.

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

Reply via email to