Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » What flag for conditional compile to GUI or CLI
What flag for conditional compile to GUI or CLI [message #49857] |
Mon, 21 May 2018 08:08  |
slashupp
Messages: 231 Registered: July 2009
|
Experienced Member |
|
|
could be this is a stupid question:
the flags are defined in upp & to access them must include upp-headers
(giving chicken / egg problem)
so must define some local flag / boolean that is set/unset when upp-headers are used
and this local flag / boolean must then be checked in my code
BUT!: the build-flag 'GUI' is used when building gui-apps, and not available? when cli-app? please advise
----
What flag(s) must I use to conditional compile for either GUI or CLI?
I've tried:
//#if defined(GUI)
//#if defined(GUI_X11) || defined(GUI_WIN) || defined(GUI_WIN32) || defined(GUI_GTK)
//#if defined(GUI_APP_MAIN)
//#if defined(GUI_WIN) || defined(PLATFORM_X11)
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
void PRINTSTRING(const std::string &s) { PromptOK(DeQtf(s.c_str())); }
#else
void PRINTSTRING(const std::string &s) { std::cout << s << std::flush; }
#endif
[Updated on: Mon, 21 May 2018 09:32] Report message to a moderator
|
|
|
|
|
Re: What flag for conditional compile to GUI or CLI [message #49866 is a reply to message #49865] |
Tue, 22 May 2018 12:14  |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Slashupp,
You can directly contact with me via Slack. If you do not have account - please follow the steps on this documentation page. Making documentation for U++ is easy, all you need to do is edit T++ files. However to start doing this you need the committer privileges on our SVN trunk. To obtain that privileges, please contact Mirek directly (via forum message or on Slack).
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Tue, 22 May 2018 12:14] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Apr 25 12:45:19 CEST 2025
Total time taken to generate the page: 0.00875 seconds
|