I'm trying to create a standalone executable in c++ using the octave libraries (http://www.gnu.org/software/octave/doc/interpreter/Standalone-Programs.html#Standalone-Programs). I've been following this process: How do I create a simple Octave distributable without installing Octave.
My problem- When I use my own script in feval, I get "error: feval: function 'my_m_file' not found."
How do I get feval to find my script? It is currently in the same directory as my executable. Thanks,
Melissa
You can use octave::feval(). I recently had this problem in version 6.1.0 .
Related
I am trying to build and use a piece of C++ code that uses OpenCV. I am working on Linux, working in Code::Blocks (and the code was originally also developed on a Linux platform using C::B).
I followed this to install OpenCV (Ubuntu 12.04 & OpenCV 2.4.3). The project compiles fine, but when I try to execute it, it crashes on launch, with the following message about how it can not find the library:
(file_address): error while loading shared libraries: libopencv_core.so.2.3:
cannot open shared object file: No such file or directory
Process returned 127 (0x7F) execution time : 0.017 s Press ENTER to continue.
I set all the parameters for the linker according to several Code::Blocks install tutorials.
I also checked in /usr/local/lib/ for my libraries (it is the folder I gave to Code::Blocks' compiler); and while I do have a libopencv_core.so, a libopencv_core.so.2.4 and a libopencv_core.2.4.3, I do not have a libopencv_core.so.2.3.
So I'm wondering what the issue is. Is it about backwards compatibility, i.e. do I have to install the exact same version of OpenCV used to develop the original code? (This would be a bit concerning, since I am trying to make a widely-usable library).
Could I force it to use libopencv_core.so.2.4 instead?
EDIT: I managed to make it work by removing everything and reinstalling with a simple apt-get. Sometimes it's the simplest method that works the best! From now on I'll try to apt-get before following installation tutorials. ;)
Have a nice day!
I am building a small QT (C++) application where I ask user the software he want to install. Once he selected some packages a, b, c from the list all I have to do is run
sudo apt-get install a b c
One way of doing this is using Qprocess or System and run this command directly from C++. But I thought this would be a hack and wanted to do using apt-pkg C++ library. But sadly documentation is very sparse for this library :( I saw source codes of some similar softwares - Software updater ( apt-watch ) etc and found it too complex. Just to run above command, it has lot of code - Initializing pkgCacheFile, PkgIterator, pkgAcqArchive.
Do I have to do all this to run this simple command ? Isn't there a direct function which takes software name as argument and install it ? Where Can I get a sample working code for the same ?
Thanks
I suggest Packagekit.
Here's a link to its documentation page containing some examples
i'm using matlab 2013a (win7 64bit).
install opencv on C:\OpenCV-2.4.7
how we connect Open Cv libraries into MATLAB's ?
Quick start -->
http://groups.inf.ed.ac.uk/calvin/calvin_upperbody_detector/downloads/README.html
e.g.
from the bash command line execute:
LD_LIBRARY_PATH="path_to_opencv_lib:$LD_LIBRARY_PATH"
I'm using mexopencv. It easy to use and well documented. But if you want to get the real OpenCV MATLAB wrapper, you can only get it from the GitHub and not with the .exe
The OpenCV Matlab module
I have the following error in Eclipse CDT (using Windows 7). How to correct it?
Error: Program "make" not found in PATH
PATH=[C:\cygwin\bin;C:/Program Files/Java/jre1.6.0/bin/client;C:/Program Files/Java/jre1.6.0/bin;C:/Program Files/Java/jre1.6.0/lib/i386;C:\Program Files\WinRAR;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\cygwin\bin\;C:\Users\user\AppData\Local\Temp\Rar$EX00.502\eclipse]
Path Environment variable has the following
C:\cygwin\bin\
BASH
You should install make package in cygwin. To do this execute cygwin setup.exe and when the window of packages opened, search make and install it. This is gonna solve your problem i think
You're missing make which is used for processing Makefiles to build programs.
Also to me it seems that this is more related to superuser.com, here is a similar question.
I am building a C++ application that embeds the Lua scripting engine. I am developing on Linux (Ubuntu).
I have already installed Lua on my dev machine (by imstalling the lua5.1 package). I can run the Lua intepreter succesfully (via the cmd line).
However, when building, I get the following link error:
/usr/bin/ld: cannot find -llua5.1
I have searched the Ubuntu forums/package repositories etc but I cannot seem to find the required package. Can anyone help?
PS: I also need to install the development files for tolua++ (I'm not sure which Ubuntu package is the required one either).
I am on Ubuntu 10.0.4
Install the liblua5.1-dev package, and if that does not work compile Lua from sources.
Or you can try -llua instead of -llua5.1.
on Fedora 17 problem fixed:
sudo ln /usr/lib/liblua-5.1.so /usr/lib/liblua5.1.so
For tolua++, it looks like libtolua++5.1-dev is the package you want.