Re: [PDCurses] Compiling trouble under VC++

2001-02-15 Thread John Q. Smith

  Hmmm, thanks--I finally got testcurs.c to compile (I note that it 
has at least two errors unrelated to pdcurses in it--it couldn't find 
either strlen or isprint, I had to add string.h and ctype.h to get it to 
work)  While I actually have MS-VC++ 5, the instructions were enough 
that I found the settings it needed--it wanted me to enter explicitly 
that it required curses.lib in one of them (I would think that it 
wouldn't be hard to figure out, but I guess there's no standard naming 
convention or something?  It's probably too obvious that I haven't used 
any code that isn't in standard headers before now...)

  I'm not sure that everything in it looks quite right (i.e. after 
it resized the screen, it certainly didn't reset it to normal...) but at 
least I can now fiddle with it on my own.  Thanks :)




RE: [PDCurses] Compiling trouble under VC++

2001-02-14 Thread sproaticus

> I then copied:
> [etc]
> I couldn't see where to put curses.dll so I left it alone.

I'm assuming you're just trying to use the PDCurses API, and not
re-compiling curses.dll...?  Curses apps build fine for me with MS VC 6.0
from the command-line.  I think what the problem you're seeing is related to
your moving the files around.  (I tend to keep my non-MSVC libraries
separate.)  It still should be ok to do so, however, as long as you follow
these rules:

curses.h, panel.h, (and maybe xcurses.h, and x11.h) need to be in your
INCLUDE path -- C:\Program Files\DevStudio\VC\include should be okay

curses.lib, pdcurses.lib, and panel.lib need to be in your LIB path --
again, C:\Program Files\DevStudio\VC\lib should be okay

curses.dll should be in your PATH path -- whereever your Windows directory
is should be ok, though again I'd put it somewhere else and point my path to
that dir

...

A better (IMHO) approach would be to keep everything PDCurses in the
PDCurses directory, and point your VC project to it.  In the Project
Settings dialog, Tab "C/C++", Category "Preprocessor", text field
"Additional include directories", you can type in the PDCurses directory so
VC will find curses.h etc.  Similarly, in the tab "Link", Category "Input",
text field "Additional Library Path", type in the PDCurses directory so VC
will find the .lib files.  Lastly, in the tab "Debug", Category "Additional
DLLs", point to the file curses.dll.

This approach has the added benefit of portability of your project -- it
doesn't require you to copy different project files into different
directories, should you need to work on another machine.

I hope this helps, please let me know if it does or not.

Cheers,
 - jsproat

--
Stewie: What do you want?
Man in White:  I want the hell out of here!
Stewie:  I'm sorry, we're fresh out of that...