I have experience programming C++ mainly in plain C++ and VisualC++ environments. Some time ago I switched to Mac (MacBook Pro with OS X Lion) and I started learning Qt4.
I have been able to write simple programs using the Qt4 GUI interface, compiling them within the Mac "Terminal" using the Bash shell. To execute the program, within Terminal I change to the Directory where the compiled application is and I type the command "open MyApplication.app" where "MyApplication.app" is the name of the program I have created. So far no problems.
Then I decided to do a non-GUI application writing some text to the console creating the file "MyConsole.cpp" as follows:
#include <iostream>
int main()
{
std::cout << "console application\n";
}
I complied the application (in Terminal) using the normal "qmake -project", "qmake", "make" as I do with my GUI applications.
Then I do an "ls" command and all the files I expect to see are listed, "Makefile", "MyConsole.cpp", "MyConsole.o", "Qt4Console.app" and "Qt4Console.pro" where "Qt4Console" is the directory where "MyConsole.cpp" resides. In summary nothing different from what I see when I do GUIs.
Now here is the problem I have:
When I enter the command (in Terminal) "open Qt4Console.app", nothing happens. Terminal responds printing in the screen the current directory.
I have tried variations of the code that print to the screen but I see nothing.
Any Ideas about solving this? Please keep in mind that my knowledge of Terminal Bash is very limited and I am afraid I am missing some configuration, switch, flag, etc. to capture text in the console
Thank you
Bookmarks