Hi again, I got a private response by email:
>> When linking statically, -lXCurses must come before the list of >> objects to include: >> ${TARGET}: $O >> ${CC} -o $@ ${LDFLAGS} $O I assume -lXCurses means -lpdcurses. Anyway, I thought libraries always came after objects when compiling. But, for the sake of completeness, here's what I tried: A) gcc -o vn.exe $(OBJS) -Lc:/pdc/win32 -Lc:/vn -lpdcurses -lvn -lm B) gcc -o vn.exe $(OBJS) -Lc:/pdc/win32 -Lc:/vn -lvn -lpdcurses -lm C) gcc -o vn.exe -Lc:/pdc/win32 -Lc:/vn -lvn -lpdcurses -lm $(OBJS) D) gcc -o vn.exe -Lc:/pdc/win32 -lpdcurses $(OBJS) -Lc:/vn -lvn -lm A) results in undefined reference to curses functions (eg, waddstr) B) compiles, but then requires the pdcurses.dll to run C) results in undefined references to functions in libvn.a D) results in undefined reference to curses functions (eg, waddstr) In my continuing floundering, I also tried using "-static" gcc flag, but that did not help. Could someone please advise what I'm doing wrong or need to do different? Thanks, Daniel Goldman Daniel Goldman wrote:
Hi, I swear I used to statically link pdcurses into an application. I few months back (for some reason) I reinstalled pdcurses. Now I can't static link. I use pdcurses 3.4 / mingw gcc. I'm very familiar with makefiles and gcc. I'm sure it's something I'm doing wrong. I've tried different ways. But I'm kind of floundering. It compiles OK. But when it runs, it gives an error message unless the DLL is in the path. So I'm using pdcurses.dll for now. But I don't want to be limited. I'd like to have static linking too. I looked through the docs and mailing list, and came up empty. Am I supposed to be able to statically link libpdcurses.a file? Any example? Do I need to recompile .a library archive? Could someone please advise? Thanks, Daniel Goldman