Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
slashupp is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Promising results from CLANG/LLVM 6.0.0 on Windows
Next Topic: I can't to build exe-file from default package.
Goto Forum:
  


Current Time: Sat Apr 20 16:11:21 CEST 2024

Total time taken to generate the page: 0.02524 seconds