MX2_CPP_OPTS_DESKTOP/MX2_LD_OPTS_DESKTOP Question

Community Forums/Monkey2 Talk/MX2_CPP_OPTS_DESKTOP/MX2_LD_OPTS_DESKTOP Question

dawlane(Posted 2016) [#1]
Are MX2_CPP_OPTS_DESKTOP & MX2_LD_OPTS_DESKTOP meant to be used in a similar fashion as #CC_OPTS in MonkeyX source files? Or can they be only used within the env config text files located in the bin directory?


marksibly(Posted 2016) [#2]
These are only for use in the env file - all these files do is set some env vars that mx2cc uses when building.


dawlane(Posted 2016) [#3]
That I think that will cause a few problems if someone should write a module that requires certain compiler options and libraries to work. Having these options on a global scale would mean unnecessary search and linkages when not needed. As well as causing a headache for the writers of such modules and inexperienced users not knowing the changes in the environment file would mean that their simple Hello World application would require that their end users would need those unnecessary runtime libraries.

Edit:
I would suggest that the mx2cc checks for a environment file in the root folder of a project or module so the defaults can be overridden if needed.