Error while compiling Ogre code - c++

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

Related

‘tls’ is not a member of ‘asio::ssl::context’ C++ error

I am trying to build this github repository: https://github.com/socketio/socket.io-client-cpp
It is dependant on this repository https://github.com/zaphoyd/websocketpp
I got a few downloads while trying to build both and solved most with downloading libboost-dev and a few other libraries but i got an error that i can't seem to solve:
/home/ktbm/socket.io-client-cpp/src/internal/sio_client_impl.cpp: In member function ‘sio::client_impl::context_ptr sio::client_impl::on_tls_init(websocketpp::connection_hdl)’:
/home/ktbm/socket.io-client-cpp/src/internal/sio_client_impl.cpp:586:83: error: ‘tls’ is not a member of ‘asio::ssl::context’
context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tls));
^~~
CMakeFiles/sioclient_tls.dir/build.make:110: recipe for target 'CMakeFiles/sioclient_tls.dir/src/internal/sio_client_impl.cpp.o' failed
make[2]: *** [CMakeFiles/sioclient_tls.dir/src/internal/sio_client_impl.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sioclient_tls.dir/all' failed
make[1]: *** [CMakeFiles/sioclient_tls.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I haven't found anyone with a similar problem and i am not sure which library causes this issue, probably an old asio library but could also be a boost error

install opencv on ubuntu 18.04

I've been trying to install opencv, using this referance. But when I try to run make command, I get error as follows:
/opt/opencv/modules/videoio/src/cap_dc1394_v2.cpp:59:10: fatal error:
dc1394/dc1394.h: No such file or directory
#include <dc1394/dc1394.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:278: recipe for
target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o'
failed
make[2]: ***
[modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o] Error
1
CMakeFiles/Makefile2:6307: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I tried so many times to install opencv, when the installation is completed, I tried to check the installation, and then I get error that there is no module named opencv.
I recommend to use this guide to download the OpenCV Libary to the linux. (ubuntu 18.04).
I did it today on my ubuntu 18.04 and it worked perfectly, but please read all the guide and don't just copy the terminal commands.

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

cygwin, compiling ncmpcpp: error: ‘postfix_increment_proxy’ is not a class template

i'm trying to compile ncmpcpp on cygwin. i got it to configure after wrestling with dependencies, but when i try to make this error pops up:
In file included from utility/comparators.h:26:0,
from utility/comparators.cpp:22:
./mpdpp.h: In constructor ‘MPD::Directory::Directory(const mpd_directory*)’:
./mpdpp.h:134:62: error: ‘mpd_directory_get_last_modified’ was not declared in this scope
m_last_modified = mpd_directory_get_last_modified(directory);
^
In file included from ./menu.h:26:0,
from ./format.h:26,
from ./settings.h:32,
from utility/comparators.h:27,
from utility/comparators.cpp:22:
/usr/include/boost/range/detail/any_iterator.hpp: At global scope:
/usr/include/boost/range/detail/any_iterator.hpp:131:15: error: ‘postfix_increment_proxy’ is not a class template
class postfix_increment_proxy<
^
/usr/include/boost/range/detail/any_iterator.hpp:176:15: error: ‘writable_postfix_increment_proxy’ is not a class template
class writable_postfix_increment_proxy<
^
Makefile:603: recipe for target 'comparators.o' failed
make[2]: *** [comparators.o] Error 1
make[2]: Leaving directory '/home/aritsune/ncmpcpp/src'
Makefile:455: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/aritsune/ncmpcpp'
Makefile:365: recipe for target 'all' failed
make: *** [all] Error 2
i'm new to compiling from source and this error seems pretty unique. what could be causing it?
It looks like you don't have all the prerequisites required. Always address the errors in the order they occur. The first error occurs in mpdpp.h, on line 134, mpd_directory_get_last_modified. If I Google mpd_directory_get_last_modified the first result is a link to documentation for libmpdclient. Make sure you have this library and your compiler can find it.
As for the Boost error, if you are using version 1.57, it sounds like this bug:
https://svn.boost.org/trac/boost/ticket/10754
which is discussed in this thread:
Can't compile boost/any_iterator.hpp in boost 1.57