Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build on FreeBSD 10.2 #3

Open
yggdr opened this issue Feb 20, 2016 · 2 comments
Open

Can't build on FreeBSD 10.2 #3

yggdr opened this issue Feb 20, 2016 · 2 comments

Comments

@yggdr
Copy link

yggdr commented Feb 20, 2016

Hi,

just found this in OpenBSD's ports, so I thought I'd try it on FreeBSD. Since it's not in their ports, I tried compiling it myself, but I ran into problems. The first was solved by moving the #include <sys/types.h> before the BSDMAKE conditional include of includes.h, lest he complains about non-existing size_t definition. But even so, this happens during make:

iwatch.c:351:6: warning: implicit declaration of function 'addnwstr' is invalid in C99
      [-Wimplicit-function-declaration]
                                        addwch(*p++);
                                        ^
iwatch.c:74:20: note: expanded from macro 'addwch'
#define addwch(_x)      addnwstr(&(_x), 1);
                        ^
1 warning generated.
cc -O2 -pipe   -std=gnu99 -std=gnu99 -Qunused-arguments  -fstack-protector   -o iwatch iwatch.o -lcurses
iwatch.o: In function `display':
iwatch.c:(.text+0xe6a): undefined reference to `addnwstr'
iwatch.c:(.text+0x1091): undefined reference to `addnwstr'
iwatch.c:(.text+0x11bd): undefined reference to `addnwstr'
iwatch.c:(.text+0x120d): undefined reference to `addnwstr'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

I looked into /usr/include/curses.h, and it seems to define the function there, but I'm not really a C programmer, so I'm stumped here.

@yasuoka
Copy link
Contributor

yasuoka commented Feb 20, 2016

Makefile is written for OpenBSD. Please do ./configure && gmake (GNU make from ports) on FreeBSD.

yasuoka added a commit that referenced this issue Nov 22, 2016
It is not usable for FreeBSD.  Reported by yggdr on #3.
@txgk
Copy link

txgk commented Aug 11, 2022

Wide character functions on OpenBSD are declared only if you compile with -D_XOPEN_SOURCE_EXTENDED flag. I say this here after so many years simply because I myself encountered this problem. Maybe it will be useful to someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants