开发者

Linker warnings when using stdscr (ncurses)

Okay, so I'm getting these warnings whenever I try to use stdscr in pdcurses:

LIN开发者_如何学PythonK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4049: locally defined symbol "_stdscr" imported
LINK : warning LNK4049: locally defined symbol "_SP" imported

How do I fix this? They're just warnings, but when I run my program, it crashes, so they probably have something to do with it. Especially considering the fact that the line it crashes at is the one that uses stdscr...


You generally see that In MSVC when you have a program calling libraries that are build in a different RTL model.

Look in your "compiler options", maybe under "code generation." You should be able to find the run time library setting.

It may talk about debug/multithreaded/single...

Make sure that the run time library setting for your program matches the settings for all of you libraries. That ought to take care of the problem.

As to the crash, I recommend finding a sample program for pdcurses online. In theory that ought to compile, and function correctly. Use that as a basis to fix the library settings, then refactor it into the form you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜