pdcurses works well with code::blocks but is there any way to use pdcurses with visual Studio, plz help.

>pdcurses works well with code::blocks but is there any way to use pdcurses with visual Studio, plz help.
Yes, it's possible, look at the README file :)

ok i did the below step, but not working as it always open the Visual Studio Conversion wizard window.

1- set PDCURSES_SRCDIR=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\pdcurs34

2- cd C:\Program Files (x86)\Microsoft Visual Studio 8\VC\pdcurs34\win32

3- C:\Program Files (x86)\Microsoft Visual Studio 8\VC\pdcurs34\win32>vcwin32.mak -f vcw32.make
and try
3- C:\Program Files (x86)\Microsoft Visual Studio 8\VC\pdcurs34\win32>vcwin32.mak -f vcw32
and try
3- C:\Program Files (x86)\Microsoft Visual Studio 8\VC\pdcurs34\win32>vcw32-make -f vcwin32.mak (as in youtube)
but nothing works. plz help.

I tried again after paying so much attenshion on the readme files and after editing the vcwin32.mak file, but failed to achive my goal.

1- c:\>set PDCURSES_SRCDIR=C:\pdcurs34

2- c:\>path = C:\pdcurs32\win32

3- c:\>cd C:\pdcurs34\win32

4 - c:\pdcurs32\win32>nmake -f vcwin32.mak
but when i press enter Console show an error that "nmake is not an internal or external command"

5- c:\pdcurs32\win32>vcwin32.mak -f nmake
when i type the above line and press enter then it open the Visual Studio Conversion wizard window which is fail after an error msg.

plz any one here who can help me to set up pdcurses

>>2- c:\>path = C:\pdcurs32\win32
DON'T DO THAT! because it will destroy the entire PATH environment variable. Instead, you need to run the vcvars32.bat batch file in the compiler's bin directory to set the compiler's DOS environment variables.

I copy vcvars32.bat file into the c:\ root directory to make it easier to access and run because the compiler's directory is just tooooo dam long (mine is the same place your is).

>>5- c:\pdcurs32\win32>vcwin32.mak -f nmake

That is wrong. c:\pdcurs32\win32>nmake -f vcwin32.mak

now nmake is working well, and it starts the execution but it stop after the below error.

C:\pdcurs34\win32>nmake -f vcwin32.mak

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe -nologo -I.. -c -O1 ../pdcurses\addch.c ../pdcurses\addchstr.
c ../pdcurses\addstr.c ../pdcurses\attr.c ../pdcurses\beep.c ../pdcurses\bkgd.c
../pdcurses\border.c ../pdcurses\clear.c ../pdcurses\color.c ../pdcurses\delch.c
../pdcurses\deleteln.c ../pdcurses\deprec.c ../pdcurses\getch.c ../pdcurses\get
str.c ../pdcurses\getyx.c ../pdcurses\inch.c ../pdcurses\inchstr.c ../pdcurses\i
nitscr.c ../pdcurses\inopts.c ../pdcurses\insch.c ../pdcurses\insstr.c ../pdcurs
es\instr.c ../pdcurses\kernel.c ../pdcurses\keyname.c ../pdcurses\mouse.c ../pdc
urses\move.c ../pdcurses\outopts.c ../pdcurses\overlay.c ../pdcurses\pad.c ../pd
curses\panel.c ../pdcurses\printw.c ../pdcurses\refresh.c ../pdcurses\scanw.c ..
/pdcurses\scr_dump.c ../pdcurses\scroll.c ../pdcurses\slk.c ../pdcurses\termattr
.c ../pdcurses\terminfo.c ../pdcurses\touch.c ../pdcurses\util.c ../pdcurses\win
dow.c ../pdcurses\debug.c

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 8\VC
\bin\cl.exe"' : return code '0xc0000135'
Stop.

Thanks for the Help, Problem is solved after running the vcvarsall.bat and now program is compiling with out error but when i try to run the program lot of linker error occured,

please tell me how to link the required library.
1>------ Build started: Project: cursesfirst, Configuration: Debug Win32 ------
1>Linking...
1>curses.obj : error LNK2019: unresolved external symbol _endwin referenced in function _main
1>curses.obj : error LNK2019: unresolved external symbol _wgetch referenced in function _main
1>curses.obj : error LNK2019: unresolved external symbol _refresh referenced in function _main
1>curses.obj : error LNK2019: unresolved external symbol _printw referenced in function _main
1>curses.obj : error LNK2001: unresolved external symbol __imp__COLS
1>curses.obj : error LNK2001: unresolved external symbol __imp__LINES
1>curses.obj : error LNK2019: unresolved external symbol _keypad referenced in function _main
1>curses.obj : error LNK2001: unresolved external symbol __imp__stdscr
1>curses.obj : error LNK2019: unresolved external symbol _cbreak referenced in function _main
1>curses.obj : error LNK2019: unresolved external symbol _initscr referenced in function _main
1>curses.obj : error LNK2019: unresolved external symbol _wrefresh referenced in function "struct _win * __cdecl create_newwin(int,int,int,int)" (?create_newwin@@YAPAU_win@@HHHH@Z)
1>curses.obj : error LNK2019: unresolved external symbol _box referenced in function "struct _win * __cdecl create_newwin(int,int,int,int)" (?create_newwin@@YAPAU_win@@HHHH@Z)
1>curses.obj : error LNK2019: unresolved external symbol _newwin referenced in function "struct _win * __cdecl create_newwin(int,int,int,int)" (?create_newwin@@YAPAU_win@@HHHH@Z)
1>curses.obj : error LNK2019: unresolved external symbol _delwin referenced in function "void __cdecl destroy_win(struct _win *)" (?destroy_win@@YAXPAU_win@@@Z)
1>curses.obj : error LNK2019: unresolved external symbol _wborder referenced in function "void __cdecl destroy_win(struct _win *)" (?destroy_win@@YAXPAU_win@@@Z)
1>Debug\cursesfirst.exe : fatal error LNK1120: 15 unresolved externals
1>Build log was saved at "file://c:\Users\Admin\Documents\Visual Studio 2005\Projects\cursesfirst\cursesfirst\Debug\BuildLog.htm"
1>cursesfirst - 16 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

post your program. Did you add the pdcursis.lib to your project? Project --> Properties --> Configuration Properties --> Linker --> Input

pdcurses contains several example programs that you might want to review to see how it works.

i m using visual studio 2005 on 64 bit Vista.
now program is running fine after your step by step help, but there below warnings,

1>------ Build started: Project: cursesfirst, Configuration: Debug Win32 ------
1>Linking...
1>LINK : Debug\cursesfirst.exe not found or not built by the last incremental link; performing full link
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>curses.obj : warning LNK4049: locally defined symbol _stdscr imported

now nmake is working well, and it starts the execution but it stop after the below error.

C:\pdcurs34\win32>nmake -f vcwin32.mak

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe -nologo -I.. -c -O1 ../pdcurses\addch.c ../pdcurses\addchstr.
c ../pdcurses\addstr.c ../pdcurses\attr.c ../pdcurses\beep.c ../pdcurses\bkgd.c
../pdcurses\border.c ../pdcurses\clear.c ../pdcurses\color.c ../pdcurses\delch.c
../pdcurses\deleteln.c ../pdcurses\deprec.c ../pdcurses\getch.c ../pdcurses\get
str.c ../pdcurses\getyx.c ../pdcurses\inch.c ../pdcurses\inchstr.c ../pdcurses\i
nitscr.c ../pdcurses\inopts.c ../pdcurses\insch.c ../pdcurses\insstr.c ../pdcurs
es\instr.c ../pdcurses\kernel.c ../pdcurses\keyname.c ../pdcurses\mouse.c ../pdc
urses\move.c ../pdcurses\outopts.c ../pdcurses\overlay.c ../pdcurses\pad.c ../pd
curses\panel.c ../pdcurses\printw.c ../pdcurses\refresh.c ../pdcurses\scanw.c ..
/pdcurses\scr_dump.c ../pdcurses\scroll.c ../pdcurses\slk.c ../pdcurses\termattr
.c ../pdcurses\terminfo.c ../pdcurses\touch.c ../pdcurses\util.c ../pdcurses\win
dow.c ../pdcurses\debug.c

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 8\VC
\bin\cl.exe"' : return code '0xc0000135'
Stop.

I'm using Windows 7 with Visual Studio 2008 Professional and also had this problem. I solved this way...

#1. In the system variables:
add in INCLUDE variable:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include;
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;

add in LIB variable:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;
C:\Program Files\Microsoft Visual Studio 9.0\VC\lib

add in Path variable:
C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;


#2. In the command prompt (cmd):
- set PDCURSES_SRCDIR=C:\yourDirectoryWithoutSpaces\pdcurs34
- cd C:\yourDirectoryWithoutSpaces\pdcurs34\win32
- nmake -f vcwin32.mak

#3. In the Visual Studio add the library:
Just go to project properties -> Configuration properties -> Linker.
Goto to ->General and set the "Additional Library directories" to point to your lib file directory.
Then goto to Linker -> Input and type in your lib file name (e.g. pdcurses.lib and panel.lib) in the "Additional Dependencies" field

Comments
Good first post :)
This article has been dead for over six months. Start a new discussion instead.