ga2arch / slack

c++ slack ncurses client
GNU General Public License v3.0
40 stars 3 forks source link

Input.cpp:34:21: error: ‘wget_wch’ was not declared in this scope #5

Closed ggodreau closed 7 years ago

ggodreau commented 7 years ago

Having some issues building:

slack/build$ make

[ 11%] Building CXX object CMakeFiles/slack++.dir/main.cpp.o
[ 22%] Building CXX object CMakeFiles/slack++.dir/src/SlackClient.cpp.o
[ 33%] Building CXX object CMakeFiles/slack++.dir/src/SlackUI.cpp.o
[ 44%] Building CXX object CMakeFiles/slack++.dir/src/Window.cpp.o
[ 55%] Building CXX object CMakeFiles/slack++.dir/src/Input.cpp.o
slack/src/Input.cpp: In member function ‘virtual int Input::wait(Session&)’:
slack/src/Input.cpp:34:21: error: ‘wget_wch’ was not declared in this scope
     wget_wch(win, &c);
                     ^
CMakeFiles/slack++.dir/build.make:158: recipe for target 'CMakeFiles/slack++.dir/src/Input.cpp.o' failed
make[2]: *** [CMakeFiles/slack++.dir/src/Input.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/slack++.dir/all' failed
make[1]: *** [CMakeFiles/slack++.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

16.04 Ubuntu x64 machine, any help appreciated and thanks

FedeDP commented 7 years ago

Have you installed ncursesw? (libncursesw5-dev package i guess) EDIT: i now see that ncursesw is missing from our build dep section in readme, i'm sorry!

ggodreau commented 7 years ago

Thanks FedeDP! Installed libncursesw5-dev (as well as the 32bit variant), still receive the following:

greg@gregdev:~/ga/slack/build$ make

[ 11%] Building CXX object CMakeFiles/slack++.dir/main.cpp.o
[ 22%] Building CXX object CMakeFiles/slack++.dir/src/SlackClient.cpp.o
[ 33%] Building CXX object CMakeFiles/slack++.dir/src/SlackUI.cpp.o
[ 44%] Building CXX object CMakeFiles/slack++.dir/src/Window.cpp.o
[ 55%] Building CXX object CMakeFiles/slack++.dir/src/Input.cpp.o
/home/greg/ga/slack/src/Input.cpp: In member function ‘virtual int Input::wait(Session&)’:
/home/greg/ga/slack/src/Input.cpp:34:21: error: ‘wget_wch’ was not declared in this scope
     wget_wch(win, &c);
                     ^
CMakeFiles/slack++.dir/build.make:158: recipe for target 'CMakeFiles/slack++.dir/src/Input.cpp.o' failed
make[2]: *** [CMakeFiles/slack++.dir/src/Input.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/slack++.dir/all' failed
make[1]: *** [CMakeFiles/slack++.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
FedeDP commented 7 years ago

Mmmh did you run a "cmake ../" again before building? I cannot see any issue (you should have every dep installed)...

ggodreau commented 7 years ago

@FedeDP Yep - did a full re-clone as well. All dependencies seem to be satisfied, along with a proper SLACK_TOKEN env variable. Same error :-/

FedeDP commented 7 years ago

Can you try to add a "message(${CURSES_INCLUDE_DIR})" line right after "find_package(Ncursesw REQUIRED)" line, in CMakeLists.txt, then run again:

cmake ../

Finally, paste here the output of the command! Thank you very much!

EDIT: can you paste me the output of

pkg-config --cflags-only-I ncursesw

too?

ggodreau commented 7 years ago

@FedeDP

cmake:

greg@gregdev:~/ga/slack/build$ cmake ../
Using libnotify
/usr/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/greg/ga/slack/build

pkg-config

greg@gregdev:~/ga/slack/build$ pkg-config --cflags-only-I ncursesw
-I/usr/include/ncursesw

build

greg@gregdev:~/ga/slack/build$ make
[ 11%] Building CXX object CMakeFiles/slack++.dir/src/Input.cpp.o
/home/greg/ga/slack/src/Input.cpp: In member function ‘virtual int Input::wait(Session&)’:
/home/greg/ga/slack/src/Input.cpp:34:21: error: ‘wget_wch’ was not declared in this scope
     wget_wch(win, &c);
                     ^
CMakeFiles/slack++.dir/build.make:158: recipe for target 'CMakeFiles/slack++.dir/src/Input.cpp.o' failed
make[2]: *** [CMakeFiles/slack++.dir/src/Input.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/slack++.dir/all' failed
make[1]: *** [CMakeFiles/slack++.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
FedeDP commented 7 years ago

Found the issue! Can you please retry? Note that you'll now need pkg-config to be installed too. Remember to remove old build/ folder in order to let cmake clean build the package.

ggodreau commented 7 years ago

Hooray - thank you! Issue confirmed fixed commit a712bbe5f4d89a0920689b50efaebf7ca2991050 @FedeDP