Coder Social home page Coder Social logo

Comments (5)

wmcbrine avatar wmcbrine commented on May 27, 2024

Hmm... did you define PDC_DLL_BUILD before including curses.h?

from pdcurses.

jarruda avatar jarruda commented on May 27, 2024

I didn't. I missed that this was also needed when using the library in addition to the build steps.

Defining it for the project (or above the include) makes the library behave as expected. 👍 Thank you for the quick response.

I wonder if modifying curses.h could be added to the build process when preparing a DLL distribution?

from pdcurses.

wmcbrine avatar wmcbrine commented on May 27, 2024

What I don't get is why it didn't fail with an "unresolved external symbol _stdscr" error on link with PDC_BUILD_DLL undefined, which is what I get when I try it here.

from pdcurses.

jarruda avatar jarruda commented on May 27, 2024

Replicating my setup should be very easy if you're willing to install vcpkg.

PS> git clone https://github.com/Microsoft/vcpkg
PS> cd vcpkg
PS> .\bootstrap-vcpkg.bat
PS> .\vcpkg integrate install
PS> .\vcpkg install pdcurses

Then copy/paste the above snippet into a new project. vcpkg takes care of the include paths and linking the library to the project.

I'm also confused as to why there wasn't a linker error. In fact, if I change the initscr line to:

    stdscr = initscr();

I get an access violation writing to that address.

from pdcurses.

wmcbrine avatar wmcbrine commented on May 27, 2024

Some more discussion here: https://stackoverflow.com/questions/33504411/why-the-stdscr-variable-does-not-work-in-pdcurses/50052560#50052560

I don't think there's anything more to be done here.

from pdcurses.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.