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...





[PDCurses] Compiling trouble under VC++

2001-02-09 Thread John Q. Smith

I downloaded the version compiled for VC++ off of:
http://www.lightlink.com/hessling/PDCurses/

I then copied:
curses.h 
=> C:\Program Files\DevStudio\VC\include
panel.h => C:\Program Files\DevStudio\VC\include
curses.lib 
=> C:\Program Files\DevStudio\VC\lib
panel.lib   => C:\Program Files\DevStudio\VC\lib
pdcurses.lib=> C:\Program Files\DevStudio\VC\lib

I couldn't see where to put curses.dll so I left it alone.  I then went 
to compile one of the test applications [from /demos in the uncompiled 
distribution of PDcurses, available at the URL above], fireworks.c from 
the source distribution to see if things were working, only to get this:

firework.obj : error LNK2001: unresolved external symbol _endwin
firework.obj : error LNK2001: unresolved external symbol _wclrtobot
firework.obj : error LNK2001: unresolved external symbol _wmove
... [several more errors, too long to paste, 14 or so total?]

I also tried testcurs.c which gives even more errors like this:

C:\unzipped\pdcurs24\demos\testcurs.c(388) : warning C4013: 'isprint' 
undefined; assuming extern returning int
C:\unzipped\pdcurs24\demos\testcurs.c(795) : warning C4013: 'strlen' 
undefined; assuming extern returning int
Linking...
[linking gives 70 errors ... it not finding isprint & strlen is fairly 
disturbing in itself, to be honest...]

I read the documentation [and all the source files], but it just didn't 
say anything about all this, it assumed it hadn't been compiled yet and 
didn't really say anything about what to do afterwards.  What am I doing 
wrong here?  Are those test applications not portable, or did I install 
this incorrectly, or?  Maybe I'm just doing something stupid, but if so, 
I can't figure it out...