0

Let's make an example in Eclipse: I have two different source files for a Startup with a main-function, but depending on which build configuration I use, either one of them is used, or the other one.

I do this, by defining a custom symbol with the "-d" option in one of the build configurations, and leaving it out in the other one.

#ifdef CUSTOMSYMBOL
...

Specifically, under Eclipse, I can edit these settings under Project -> Properties -> C/C++ Build -> Settings -> Cygwin C++ Compiler -> Prepocessor imgdesc (I am using Cygwin under Windows for my C++ projects)

This works. Depending on which build configuration I use, only one of the two source files will be built by the compiler and the other one will be ignored.

However, this setting is specific to Cygwin.

I can't figure out, how to do it in QNX Momentics, since I do not have those options under the qcc Compiler.

enter image description here

ilmu011
  • 80
  • 2
  • 8

1 Answers1

1

You can do this in the Compiler Tab of your QNX C/C++ Project as shown below:

enter image description here

nollak
  • 131
  • 1
  • 2
  • Thank you for your answer! Though, do you know what could be the reason, why I do not see that option? https://imgur.com/a/aUBBiz7 – ilmu011 Oct 23 '18 at 15:22
  • Did you create a C/C++ project or a QNX C/C++ project? I think you can only see it if you created the latter. – nollak Oct 23 '18 at 16:13
  • Yes, I created a C/C++ project. To be specific: New -> QNX Project -> QNX Executable – ilmu011 Oct 23 '18 at 16:17
  • Yeah altough a slightly older version due to my used hardware. If the dev environment changed with the version I am unfortunately not able to help. – nollak Oct 25 '18 at 07:59