i'am using GNAT GPS 2012. And due some libraries i must use '-mwindows' option to succesfully link my program (it is actually mixed Ada/C++).
The program works fine in 2 cases: 1) if launch it via GNAT launcher (i mean the triangle button placed on the top of toolbar) - all is ok in that case 2) if launch ".exe" separately from windows cmd or explorer and DO NOT OUTPUT ANY TEXT from the Ada side.
But(!) if launch program separately from the windows cmd or explorer than: 1) call Put or Put_Line function -> the program immediately finish (no errors, no exceptions, just exit) 2) if call printf from C++ side it will be ignored
I have established in the separate mixed Ada/C++ simple sample that this problem arises when '-mwindows' linker option is added to the Ada linker.
I have also tried to copy dlls from GNAT project to exe folder but it didn't help.
Could you please help me, guys? Thanks!