Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 116487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:11:09+00:00 2026-05-11T03:11:09+00:00

I want to compile a project differently, according to a constant defined by #define,

  • 0

I want to compile a project differently, according to a constant defined by #define, like this:

#define USE_COMPONENT_X  #if USE_COMPONENT_X ...  #endif 

and I can do that in C#. But when I go to another file in the same project, this constant is not defined. Can I in some way define a constant to all the project, like DEBUG is defined so?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:11:09+00:00Added an answer on May 11, 2026 at 3:11 am

    You can add the /define compiler switch.

    1. Open the project’s Property Pages dialog box.
    2. Click the Configuration Properties folder.
    3. Click the Build property page.
    4. Modify the Conditional Compilation Constants property.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When i want to compile my project in Xcode 4.3, i get several errors
Say we want to compile a large project (say GCC or the Linux kernel)
I want to compile a "Hello World" MS-DOS exe. Not a program that runs
I want to compile a tiny actionscript file. Is there something out there that
I have a large class ClassA that I defined in a Code::Blocks Project ProjectA.
I'm working on a project that uses lots of external libraries. Now, I like
I have a base project that feeds two different projects. I want to be
I have a java project in eclipse with different packages. How can I compile
i need to build a c++ project that exports functions to c project this
I have a Visual Studio 2010 project with C++ code that I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.