how to install curses library in c++? - c++

i cannot find anything in the internet that gives tutorial on how to install curses.h library on Code Lite. It bugs me it always gives the error:
C:/Program Files/CodeLite/ADF C++ Training/Testing/main.cpp:1:20: fatal error: curses.h: No such file or directory
#include <curses.h>
^
compilation terminated.
mingw32-make.exe[1]: *** [Debug/main.cpp.o] Error 1
mingw32-make.exe: *** [All] Error 2
Testing.mk:93: recipe for target 'Debug/main.cpp.o' failed

Related

Building gRPC from source using CMake in WSL (Ubuntu 18.04) yields missing `winsock2.h`

I am following this guide to install gRPC using CMake. First, it is actually not usable from a CMake project without tweaking the CMake command according to this other post. So I did, the configuration part works. When I run make though, it fails like this
In file included from /mnt/c/Program Files/grpc/include/ares.h:22:0,
from /mnt/c/Users/j*****/sources/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc:23:
/mnt/c/Program Files/grpc/include/ares_build.h:26:12: fatal error: winsock2.h: No such file or directory
# include <winsock2.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/grpc.dir/build.make:4768: recipe for target 'CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc.o' failed
make[2]: *** [CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc.o] Error 1
[ 85%] Building CXX object CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc.o
make[2]: *** Waiting for unfinished jobs....
In file included from /mnt/c/Program Files/grpc/include/ares.h:22:0,
from /mnt/c/Users/j*****/sources/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc:23:
/mnt/c/Program Files/grpc/include/ares_build.h:26:12: fatal error: winsock2.h: No such file or directory
# include <winsock2.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/grpc.dir/build.make:4794: recipe for target 'CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc.o' failed
make[2]: *** [CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc.o] Error 1
In file included from /mnt/c/Program Files/grpc/include/ares.h:22:0,
from /mnt/c/Users/j*****/sources/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc:29:
/mnt/c/Program Files/grpc/include/ares_build.h:26:12: fatal error: winsock2.h: No such file or directory
# include <winsock2.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/grpc.dir/build.make:4820: recipe for target 'CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc.o' failed
make[2]: *** [CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc.o] Error 1
CMakeFiles/Makefile2:702: recipe for target 'CMakeFiles/grpc.dir/all' failed
make[1]: *** [CMakeFiles/grpc.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Am I supposed to install something that is not documented ?

Emscripten cpuid.h

Edit: Im trying to generate LLVM from a c++ project, not build the LLVM system itself.
I'm trying to build LLVM through emscripten, but I need the header 'cpuid.h'.
/home/emsdk-portable/emscripten/1.37.21/build/project/main.cpp:35:10: fatal error: 'cpuid.h' file not found
#include <cpuid.h>
^~~~~~~~~
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
CMakeFiles/project.dir/build.make:86: recipe for target 'CMakeFiles/project.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/project.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/project.dir/all' failed
make[1]: *** [CMakeFiles/project.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
According to this github cpuid.h should exist (Shouldn't it?) with the included clang, but neither I nor the program itself is finding it for the include.
Fastcomp is the default backend and as such I thought cpuid.h should be locateable by whatever my program is.
Any ideas on finding/fixing the problems? Thanks

Install external C++ libraries into Clion for a C++ project under Windows 7

I am new to Clion and C++ and your help is highly appreciated!!
My goal was to download a library to solve Ordinary Differential Equations.
The zip file was downloaded from http://headmyshoulder.github.io/odeint-v2/downloads.html
and unzipped in D:\myProjects\odeint. I use Windows 7 and MinGW.
The library can't be used as shown in the following image.
Here are the error reports.
D:\myProjects\main.cpp:3:51: fatal error: odeint/include/boost/numeric/odeint.hpp: No such file or directory
compilation terminated.
CMakeFiles\myProjects.dir\build.make:61: recipe for target 'CMakeFiles/myProjects.dir/main.cpp.obj' failed
mingw32-make.exe[3]: *** [CMakeFiles/myProjects.dir/main.cpp.obj] Error 1
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/myProjects.dir/all' failed
mingw32-make.exe[2]: *** [CMakeFiles/myProjects.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles/myProjects.dir/rule] Error 2
CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/myProjects.dir/rule' failed
mingw32-make.exe: *** [myProjects] Error 2
Makefile:117: recipe for target 'myProjects' failed

Error while compiling Ogre code

OS: Ubuntu 16.04
Ogre: v1.9
I am trying to compile code from this repository. Although it is meant for Ogre v1.9, it is giving me this error:
In file included from /home/cortana/Desktop/clean-project/src/BaseApplication.cpp:17:0:
/home/cortana/Desktop/clean-project/src/BaseApplication.h:34:22: fatal error: SdkTrays.h: No such file or directory
compilation terminated.
CMakeFiles/OgreApp.dir/build.make:62: recipe for target 'CMakeFiles/OgreApp.dir/src/BaseApplication.cpp.o' failed
make[2]: *** [CMakeFiles/OgreApp.dir/src/BaseApplication.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/OgreApp.dir/all' failed
make[1]: *** [CMakeFiles/OgreApp.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
How can I fix this error?
As already mentioned in the comments, you need to make sure that your compiler is able to find the file "SdkTrays.h".
You claimed that this file is not part of Ogre version 1.9, which however is not correct. It could be that it is not part of the unofficial repository you are using. In our official one, it can be found here:
SdkTrays.h in official Ogre 1.9

QtOpenGl: No such file or directory

I installed Deepin Linux few days back. I am trying to install OpenCv2.4.10 but during compilation I am getting this error:
fatal error: QtOpenGL: No such file or directory
#include <QtOpenGL>
^
compilation terminated.
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Disable the compilation of Qt modules for opencv or install Qt with OpenGL support to solve the error