Sphinix GUI trainer Failed to compile - c++

i am trying to create ASR system for my native language called amharic and my plan is to make an aquastic model without toomuch effort. for that i thought i could use ASTRA(Advanced Sphinix Trainer ) which is made using QT. but the thing is there is only source code , no compiled binaries and wheni try to compile it using QT 5.1 mingw (X64) i get this errors .
S:\Lite\astra\audio_play.cpp:-1: In member function 'void audio_play::pause()':
S:\Lite\astra\audio_play.cpp:31: error: 'SIGSTOP' was not declared in this scope
S:\Lite\astra\audio_play.cpp:31: error: 'kill' was not declared in this scope
S:\Lite\astra\audio_play.cpp:38: error: 'SIGCONT' was not declared in this scope
S:\Lite\astra\audio_play.cpp:38: error: 'kill' was not declared in this scope
S:\Lite\astra\audio_play.cpp:-1: In member function 'void audio_play::stop_record()':
S:\Lite\astra\audio_play.cpp:50: error: 'kill' was not declared in this scope
Source code location of ASTRA -- AStra Trainer

Related

error: ‘struct cv::aruco::DetectorParameters’ has no member named ‘cornerRefinementMethod’

I recently overtook an aruco tag detection project from a coworker and I am having trouble compiling it. The actual developer of this algorithm claims that it compiles on her PC so I believe I have a setup issue. I tested the OpenCV installation by writing a simple image processing code and it worked fine however I am receiving 3 errors related the aruco library in particular. The errors are as follows:
detect_markers.cpp: In function ‘bool readDetectorParameters(std::__cxx11::string, cv::Ptr<cv::aruco::DetectorParameters>&)’:
detect_markers.cpp:128:45: error: ‘struct cv::aruco::DetectorParameters’ has no member named ‘cornerRefinementMethod’
fs["cornerRefinementMethod"] >> params->cornerRefinementMethod;
detect_markers.cpp: In function ‘int main(int, char**)’:
detect_markers.cpp:167:21: error: ‘struct cv::aruco::DetectorParameters’ has no member named ‘cornerRefinementMethod’
detectorParams->cornerRefinementMethod = aruco::CORNER_REFINE_SUBPIX; // do corner refinement in markers
detect_markers.cpp:167:46: error: ‘CORNER_REFINE_SUBPIX’ is not a member of ‘cv::aruco’
detectorParams->cornerRefinementMethod = aruco::CORNER_REFINE_SUBPIX;
I checked the cv::aruco::DetectorParameters Struct Reference and cornerRefinementMethod is actually a member of cv::aruco::DetectorParameters.
The code that I am trying to compile is a modified version of the detect_markers.cpp code that can be found here.

Declaring GnuplotHelper failed in ns3

I want to use GnuplotHelper in ns3 to plot the results. even when I run ns3's default example seventh.cc I get the following error:
../scratch/congestion.cc: In function ‘int main(int, char**)’:
../scratch/congestion.cc:173:1: error: ‘GnuplotHelper’ was not declared in this scope
GnuplotHelper plotHelper;
^
../scratch/congestion.cc:180:1: error: ‘plotHelper’ was not declared in this scope
plotHelper.ConfigurePlot ("Test","CongestionWindow vs. Time","Time (Seconds)","CongestionWindow","jpg");
^
../scratch/congestion.cc:181:81: error: ‘GnuplotAggregator’ has not been declared
plotHelper.PlotProbe (probeName,probeTrace,"CongetionWindow","CongestionWindow",GnuplotAggregator::KEY_BELOW);
If I include "gnuplot-helper.h" I get an additional line and same error:
../scratch/seventh.cc:24:28: fatal error: gnuplot-helper.h: No such file or directory
compilation terminated.
I've installed gnuplot on my linux. What should I do? How can I declare Gnuplot helper?
First, did you install a gnu-plot-dev package or just gnuplot? Many distributions separate the ability to use libraries and the ability to develop against them.
If you are sure the include files are actually on your system somewhere (check both /usr/include and /usr/local/include/) you may need to add an additional directory level to your compiler search path (perhaps /usr/include/gnuplot/ but I am only guessing there).
Try
#include "ns3/stats-module.h"

Compiling QSerialPort on OSX SnowLeopard and QT 4.8

I installed qt 4.8 on my Osx Snow Leopard, I had cloned QtSerialPort from git://gitorious.org/qt/qtserialport.git and then I tried to build it in QtCreator.
When I try to build the library I am receiving the following error:
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp:62:34: error: private/qcore_unix_p.h: No such file or directory
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp: In member function 'bool QSerialPortPrivate::open(QFlags)':
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp:218: error: 'qt_safe_open' was not declared in this scope
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp: In member function 'void QSerialPortPrivate::close()':
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp:309: error: 'qt_safe_close' was not declared in this scope
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp: In member function 'qint64 QSerialPortPrivate::readFromPort(char*, qint64)':
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp:1081: error: 'qt_safe_read' was not declared in this scope
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp: In member function 'qint64 QSerialPortPrivate::writeToPort(const char*, qint64)':
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp:1097: error: 'qt_safe_write' was not declared in this scope
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp: In member function 'qint64 QSerialPortPrivate::writePerChar(const char*, qint64)':
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp:1134: error: 'qt_safe_write' was not declared in this scope
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp: In member function 'qint64 QSerialPortPrivate::readPerChar(char*, qint64)':
/Users/warcomeb/Projects/External/qserial/qtserialport/src/serialport/qserialport_unix.cpp:1160: error: 'qt_safe_read' was not declared in this scope
make[2]: * [qserialport_unix.o] Error 1
make[1]: * [sub-serialport-make_default] Error 2
make: * [sub-src-make_default-ordered] Error 2
14:45:11: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qtserialport (kit: Desktop)
Could you please help me with this?
Repository was recently breaked for Qt 4. Please wait for fix ( https://codereview.qt-project.org/#change,77978 ) merged and then update your clone.
Basically as Sergey wrote.
I accidentally approved two changes from someone else without testing the change on Qt 4 and contributors usually test the patches only against Qt 5, except us.
Once I realized that it would break the repository, I submitted a revert for those changes, and then I re-pushed the change with some fixes to work with both Qt 4 and 5.
This should now be fixed both in the "stable" (default) and "dev" branch, so all you need to do is git pull to get in unbroken again.

how to compile with llvm and g++?

I use a fedora-11 system and recently I installed llvm ( sudo yum -y install llvm llvm-docs llvm-devel ).
When I search for llvm I get them in /usr/bin. Some of the links to the binaries are broken (llvm-gcc,llvm-g++,llvm-cpp,etc.). The include files are found within /usr/include/llvm and libs at /usr/lib/llvm. How to compile them using g++? I tried to compile the kaleidoscope code given in the tutorial as per directed, but it fails to compile.
I get this:
toy.cpp:5:30: error: llvm/LLVMContext.h: No such file or directory
toy.cpp:352: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp: In member function ‘virtual llvm::Value* NumberExprAST::Codegen()’:
toy.cpp:358: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp: In member function ‘virtual llvm::Value* BinaryExprAST::Codegen()’:
toy.cpp:379: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
toy.cpp:379: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp: In member function ‘llvm::Function* PrototypeAST::Codegen()’:
toy.cpp:407: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
toy.cpp:407: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp:408: error: ‘getDoubleTy’ is not a member of ‘llvm::Type’
toy.cpp: In member function ‘llvm::Function* FunctionAST::Codegen()’:
toy.cpp:454: error: ‘getGlobalContext’ was not declared in this scope
toy.cpp: In function ‘int main()’:
toy.cpp:543: error: ‘LLVMContext’ was not declared in this scope
toy.cpp:543: error: ‘Context’ was not declared in this scope
toy.cpp:543: error: ‘getGlobalContext’ was not declared in this scope
I cannot find the LLVMContext.h file too. So I guess this might be a version problem.
what should I do to make it work?
Some help would be good! thanks in advance... :)
Looks like the headers weren't installed or were installed in a path you aren't using. My suggestion would be to download the code from the llvm.org website or svn and use that to build up the Kaleidoscope example. It's fairly simple and all the code is in the examples directory.
Instead of using yum, install clang/llvm by following this, or this link.

Is libssl version 0.9.8e compatible with 0.9.7a?

I'm using a third party static library in my C++ project that has a dependency on libssl version 0.9.7a. Due to various reasons, the libssl version that my project used is 0.9.8e.
Everything was working fine, until the third party made a recent change to their static library. I wasn't able to successfully compile my application when it included this new version of the static library. The old version compiles fine.
I'm not very familiar with these library dependencies and their backwards compatibility. We were told that we must use the version suggested by the third party. I just want to know if that is really the reason. IMO, I guess it should be backwards compatible, shouldn't it?
Any direction with troubleshooting this issue is very much appreciated.
The following is the compilation error that I'm getting:
cc1plus: note: obsolete option -I- used, please use -iquote instead
In file included from /usr/include/openssl/e_os2.h:56,
from /usr/include/openssl/ssl.h:173,
from MyClass.cpp:28:
/usr/include/openssl/opensslconf.h:13:30: error: opensslconf-i386.h: No such file or directory
/usr/include/openssl/bn.h:288: error: expected ';' before '*' token
/usr/include/openssl/bn.h:304: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:407: error: 'BN_ULONG' was not declared in this scope
/usr/include/openssl/bn.h:450: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:451: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:452: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:453: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:454: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:455: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:456: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:471: error: 'BN_ULONG' has not been declared
/usr/include/openssl/bn.h:764: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:765: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:766: error: variable or field 'bn_sqr_words' declared void
/usr/include/openssl/bn.h:766: error: 'BN_ULONG' was not declared in this scope
/usr/include/openssl/bn.h:766: error: 'rp' was not declared in this scope
/usr/include/openssl/bn.h:766: error: expected primary-expression before 'const'
/usr/include/openssl/bn.h:766: error: expected primary-expression before 'int'
/usr/include/openssl/bn.h:767: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:768: error: 'BN_ULONG' does not name a type
/usr/include/openssl/bn.h:769: error: 'BN_ULONG' does not name a type
/usr/include/openssl/ssl3.h:303: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/pqueue.h:73: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/pqueue.h:80: error: 'PQ_64BIT' was not declared in this scope
/usr/include/openssl/pqueue.h:80: error: expected primary-expression before 'void'
/usr/include/openssl/pqueue.h:89: error: 'PQ_64BIT' has not been declared
/usr/include/openssl/dtls1.h:92: error: 'PQ_64BIT' does not name a type
/usr/include/openssl/dtls1.h:94: error: 'PQ_64BIT' does not name a type
The error message says that there's no such file as opensslconf-i386.h, but it is indeed present.
Any idea what's going wrong?
Thanks for you time!
The C pre-processor is not finding the opensslconf-i386.h file - so you need to find out why that is failing. You've got a warning from the compiler about using an obsolete option (and it recommends a fix) - do it.
OK - you say the file is present: where is it, and what are the permissions on it? How is it included by opensslconf.h? How is that line different from any other OpenSSL headers that are included. What are the '-I' options you are using other than the deprecated '-I-'?
At this stage, I'd say you've got either a faulty installation or an odd-ball command line.
And the question title is ... not obviously related to the question body.
At the operational level, yes, the two interwork for most purposes.
At the compilation level, yes, the two are basically compatible (that which worked in 0.9.7a should work with 0.9.8e).
At the internals and configuration level, there will be small differences; there may be extra ciphers or modes supported by the more recent version, for example.