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

  • Home
  • SEARCH
  • 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 4018968
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:02:54+00:00 2026-05-20T10:02:54+00:00

So I found a need in using something like Boost.Extension to keep my apps

  • 0

So I found a need in using something like Boost.Extension to keep my apps more open to new modules. But as soon as I got to first tutorial I found out that its syntax is quite not like I’m used to:

// Depending on the compiler and settings,
// it may be necessary to add a specific export
// declaration. The BOOST_EXTENSION_EXPORT_DECL
// adds this if necessary.
void BOOST_EXTENSION_EXPORT_DECL
boost_extension_hello_world(int repetitions) {
  for (int i = 0; i < repetitions; ++i) {
    std::cout << "Hello World" << std::endl;
  }
}

I want to make it possible to write something like void function instead of void BOOST_EXTENSION_EXPORT_DECL it looks better and as i have AS3 background it will not look like something horrible for me.

So how to create an overrite for C++ macro not in header where it was defined but in your own C++ file?

  • 1 1 Answer
  • 0 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. Editorial Team
    Editorial Team
    2026-05-20T10:02:55+00:00Added an answer on May 20, 2026 at 10:02 am

    You can replace BOOST_EXTENSION_EXPORT_DECL by function with:

    #define function BOOST_EXTENSION_EXPORT_DECL 
    

    Then you can use it by:

    void function boost_extension_hello_world(int repetitions) {
      for (int i = 0; i < repetitions; ++i) {
        std::cout << "Hello World" << std::endl;
      }
    }
    

    But this could cause problems if your code contains the word function, because the compiler replace all occurrence of function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to set my process to run under 'nobody', I've found os.setuid(), but
I found a question here about blogs on software development, but I would like
I'm executing a java application in DOS command window using something like java -cp
I need to send MMS thought a C# application. I have already found 2
I need to convert the punycode NIATO-OTABD to nñiñatoñ . I found a text
I found this open-source library that I want to use in my Java application.
I found What are mvp and mvc and what is the difference but it
I'm using boost::interprocess to communicates between two applications. When the two applications are launch
Using the JavaScript sample found in this stack overflow post you can have a
I've found a lot of information about using GLUT to detect whether the Ctrl

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.