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 280253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:06:09+00:00 2026-05-12T05:06:09+00:00

I am making a very simple platform independent(at least that’s the plan) console app.

  • 0

I am making a very simple platform independent(at least that’s the plan) console app. I changed from conio.h to pdCurses to make it happen. The problem with that is that in Windows, using Codeblocks and gcc I have a problem.

When I include I get tons of errors. They all concern 3 macros all located in different source files inside:

CodeBlocks\MinGW\bin..\lib\gcc\mingw32\3.4.5……..\include\c++\3.4.5\bits\

If I undef those 3 macros like this:

#include <curses.h>


#undef move
#undef erase
#undef clear

then all compiles well. If I don’t undef then I get tons of errors about these macros.

Example errors are:

macro "move" passed 3 arguments, but takes just 2|
\bits\char_traits.h|185|error: invalid function declaration|
\bits\basic_string.h|604|error: expected `)' before '->' token|
\bits\basic_string.h|1039|macro "erase" passed 2 arguments, but takes just 0|

Anyone has any idea why this happens? And any not so damn ugly way to correct the problem? Thanks in advance for your input.

Edit: I am also getting undefined references to various things whenever I invoke any pdcurses functions. I can not understand why. I definitely linked the library correctly. For example by trying to echo a char on the screen I get:

main.cpp|74|undefined reference to `__imp__SP'|
main.cpp|74|undefined reference to `__imp__stdscr'|
main.cpp|74|undefined reference to `__imp__stdscr'|

Can it be anything other than bad linking of the library? And how can I see what’s wrong with the linking of pdcurses fromthe above errors?

-Lefteris

  • 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-12T05:06:09+00:00Added an answer on May 12, 2026 at 5:06 am

    For the macro problem, do a search for “STL” in the curses.h file and you should find:

    #ifdef __cplusplus
    #ifndef NCURSES_NOMACROS
    /* these names conflict with STL */
    #undef box
    #undef clear
    #undef erase
    #undef move
    #undef refresh
    
    #endif /* NCURSES_NOMACROS */
    

    Maybe you can find a work around with that.

    EDIT: In my copy if you #define NCURSES_NOMACROS it will skip defining all the macros. As far as I looked all of them are just convenience macros for the standard screen so you really don’t lose any functionality but you have to use the functions that explicitly require the screen variable. Or, I suppose, use your own macros that don’t have name clashes.

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

Sidebar

Related Questions

I'm making a method that load a graph from a file. It's very simple,
I'm making a simple 2d game for the android platform, which works perfectly from
I have a very simple mockup I'm making for a client that uses the
I am making a very simple app in C# with Visual Studio, so I'm
I was recently making a very simple application that just printed matrix-effect out to
I have a very simple question to ask. I am making an app where
i have very simple code that i making partial postback by jquery and i
I'm making a very simple WCF (C#, .NET 4.0) licensing program that automatically emails
I am making a very simple preview window in JQuery using just an ordered
I was making this very simple lex program (just an introductory program). But on

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.