yasirtug / ni-translate

A translator for Linux, running at the background which wakes up with the translation of the last selected text on command.
GNU General Public License v3.0
85 stars 9 forks source link

popen, fscanf, pclose were not declared in this scope #1

Closed Ojigrande closed 5 years ago

Ojigrande commented 5 years ago

I have some problem with compilation of the project:

keycatcher.cpp: In member function ‘std::__cxx11::string KeyCatcher::find_path()’: keycatcher.cpp:48:32: error: ‘popen’ was not declared in this scope FILE *pipe = popen(cmd, "r"); ^ keycatcher.cpp:51:28: error: ‘fscanf’ was not declared in this scope fscanf(pipe, "%s", buff); ^ keycatcher.cpp:53:16: error: ‘pclose’ was not declared in this scope pclose(pipe); ^ make: *** [keycatcher.o] Error 1

yasirtug commented 5 years ago

Hi, could you pull the repository and try it again? I have included the missing stdio.h library into that cpp file. Thank you for the feedback, please inform me if it will solve your problem.

Ojigrande commented 5 years ago

It did not help.

I hove solved that issue by added to ni-translate.pro next string: CONFIG += c++14

yasirtug commented 5 years ago

Thank you for your feedback. I am adding it to the file, guess it will improve the portability generally.