Compiling C++ software Using Mex

4 次查看(过去 30 天)
Alex
Alex 2015-7-8
编辑: Alex 2015-7-9
Hello,
I am trying to compile a .cpp code that uses libraries such as opencv 3.0, ceres, boost, and tbb. Below is the output. I have Ubuntu 14.04 and MATLAB 2015a. I have more than one version of opencv (e.g., 2.5, 3.0) in my machine. The one needed for the code is 3.0. So I use the -L to indicate where the path for opencv3.0 libraries are yet the mex command says it can't find them. Anyone know what's going on?
Thanks
mex -v -largeArrayDims GCC='/usr/bin/g++-4.7' SingleEyeFitterCmdLite.cpp -I"/usr/local/include/eigen3/" -I"/home/vradmin/Documents/HARMONIE/singleeyefitter/build/cmd/pupiltracker/include/" -I"/home/vradmin/Documents/HARMONIE/singleeyefitter/lib/" -I"/usr/local/include" -L/home/vradmin/Documents/HARMONIE/opencv/release/lib/ -llibopencv_core -llibopencv_highgui
Warning: Legacy MEX infrastructure is provided for compatibility; it will be removed in a future version of MATLAB. For more information, consult the MEX release notes http://www.mathworks.com/help/matlab/release-notes.html. -> mexopts.sh sourced from directory (DIR = $PREF_DIR) FILE = /home/vradmin/.matlab/R2015a/mexopts.sh ---------------------------------------------------------------- -> MATLAB = /usr/local/MATLAB/R2015a -> CC = gcc-4.7 -> CC flags: CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread CDEBUGFLAGS = -g COPTIMFLAGS = -O -DNDEBUG CLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++ arguments = -> CXX = g++-4.7 -> CXX flags: CXXFLAGS = -ansi -D_GNU_SOURCE -std=gnu++11 -fPIC -fno-omit-frame-pointer -pthread CXXDEBUGFLAGS = -g CXXOPTIMFLAGS = -O -DNDEBUG CXXLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm arguments = -> FC = gfortran -> FC flags: FFLAGS = -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer FDEBUGFLAGS = -g FOPTIMFLAGS = -O FLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm arguments = -> LD = g++-4.7 -> Link flags: LDFLAGS = -pthread -shared -Wl,--version-script,/usr/local/MATLAB/R2015a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined LDDEBUGFLAGS = -g LDOPTIMFLAGS = -O LDEXTENSION = .mexa64 arguments = -L/home/vradmin/Documents/HARMONIE/opencv/release/lib/ -llibopencv_core -llibopencv_highgui -> LDCXX = -> Link flags: LDCXXFLAGS = LDCXXDEBUGFLAGS = LDCXXOPTIMFLAGS = LDCXXEXTENSION = arguments = -L/home/vradmin/Documents/HARMONIE/opencv/release/lib/ -llibopencv_core -llibopencv_highgui ----------------------------------------------------------------
-> g++-4.7 -c -I/usr/local/include/eigen3/ -I/home/vradmin/Documents/HARMONIE/singleeyefitter/build/cmd/pupiltracker/include/ -I/home/vradmin/Documents/HARMONIE/singleeyefitter/lib/ -I/usr/local/include -I/usr/local/MATLAB/R2015a/extern/include -I/usr/local/MATLAB/R2015a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -std=gnu++11 -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG "SingleEyeFitterCmdLite.cpp"
-> g++-4.7 -O -pthread -shared -Wl,--version-script,/usr/local/MATLAB/R2015a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined -o "SingleEyeFitterCmdLite.mexa64" SingleEyeFitterCmdLite.o -L/home/vradmin/Documents/HARMONIE/opencv/release/lib/ -llibopencv_core -llibopencv_highgui -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm
/usr/bin/ld: cannot find -llibopencv_core /usr/bin/ld: cannot find -llibopencv_highgui collect2: error: ld returned 1 exit status
mex: link of ' "SingleEyeFitterCmdLite.mexa64"' failed.

回答(1 个)

Harsheel
Harsheel 2015-7-9
Replace -llibopencv_core and -llibopencv_highgui to:
-lopencv_core -lopencv_highgui
For -llibname, MATLAB expands libname to liblibname.so
  1 个评论
Alex
Alex 2015-7-9
编辑:Alex 2015-7-9
Thank you. Yes. I found out that out while reading a CUDA website. However, it has not solved my problem. Most recent output below. It looks like is missing the opencv linked libraries; however, they are provided.
clc; mex -v -largeArrayDims SingleEyeFitterCmdLite.cpp clipper.cpp -I/usr/local/include -I"/usr/local/include/eigen3/" -I"/home/vradmin/Documents/HARMONIE/singleeyefitter/build/cmd/pupiltracker/include/" -I"/home/vradmin/Documents/HARMONIE/singleeyefitter/lib/" -I/usr/include/ -I/home/vradmin/Documents/HARMONIE/opencv/include -L/usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_video
if true
-> mexopts.sh sourced from directory (DIR = $PREF_DIR)
FILE = /home/vradmin/.matlab/R2015a/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /usr/local/MATLAB/R2015a
-> CC = gcc-4.7
-> CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
arguments =
-> CXX = g++-4.7
-> CXX flags:
CXXFLAGS = -ansi -D_GNU_SOURCE -std=gnu++11 -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm
arguments =
-> FC = gfortran
-> FC flags:
FFLAGS = -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm
arguments =
-> LD = g++-4.7
-> Link flags:
LDFLAGS = -pthread -shared -Wl,--version-script,/usr/local/MATLAB/R2015a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexa64
arguments = -L/usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_video
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments = -L/usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_video
----------------------------------------------------------------
-> g++-4.7 -c -I/usr/local/include -I/usr/local/include/eigen3/ -I/home/vradmin/Documents/HARMONIE/singleeyefitter/build/cmd/pupiltracker/include/ -I/home/vradmin/Documents/HARMONIE/singleeyefitter/lib/ -I/usr/include/ -I/home/vradmin/Documents/HARMONIE/opencv/include -I/usr/local/MATLAB/R2015a/extern/include -I/usr/local/MATLAB/R2015a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -std=gnu++11 -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG "SingleEyeFitterCmdLite.cpp"
-> g++-4.7 -c -I/usr/local/include -I/usr/local/include/eigen3/ -I/home/vradmin/Documents/HARMONIE/singleeyefitter/build/cmd/pupiltracker/include/ -I/home/vradmin/Documents/HARMONIE/singleeyefitter/lib/ -I/usr/include/ -I/home/vradmin/Documents/HARMONIE/opencv/include -I/usr/local/MATLAB/R2015a/extern/include -I/usr/local/MATLAB/R2015a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -std=gnu++11 -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG "clipper.cpp"
-> g++-4.7 -O -pthread -shared -Wl,--version-script,/usr/local/MATLAB/R2015a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined -o "SingleEyeFitterCmdLite.mexa64" SingleEyeFitterCmdLite.o clipper.o -L/usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_video -Wl,-rpath-link,/usr/local/MATLAB/R2015a/bin/glnxa64 -L/usr/local/MATLAB/R2015a/bin/glnxa64 -lmx -lmex -lmat -lm
SingleEyeFitterCmdLite.o: In function `mexFunction::{lambda(std::vector<singleeyefitter::EyeModelFitter::Pupil, std::allocator<singleeyefitter::EyeModelFitter::Pupil> > const&, double, double, double)#2}::operator()(std::vector<singleeyefitter::EyeModelFitter::Pupil, std::allocator<singleeyefitter::EyeModelFitter::Pupil> > const&, double, double, double) const': SingleEyeFitterCmdLite.cpp:(.text+0x624): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x834): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x9b4): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.o: In function `mexFunction::{lambda(singleeyefitter::Sphere<double> const&, std::vector<singleeyefitter::Circle3D<double>, std::allocator<singleeyefitter::Circle3D<double> > > const&)#1}::operator()(singleeyefitter::Sphere<double> const&, std::vector<singleeyefitter::Circle3D<double>, std::allocator<singleeyefitter::Circle3D<double> > > const&) const': SingleEyeFitterCmdLite.cpp:(.text+0xbdc): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0xd26): undefined reference to `cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)' SingleEyeFitterCmdLite.cpp:(.text+0xef8): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x12ea): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x14ec): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.o: In function `_GLOBAL__sub_I_SingleEyeFitterCmdLite.cpp': SingleEyeFitterCmdLite.cpp:(.text+0x1718): undefined reference to `boost::system::generic_category()' SingleEyeFitterCmdLite.cpp:(.text+0x1724): undefined reference to `boost::system::generic_category()' SingleEyeFitterCmdLite.cpp:(.text+0x1730): undefined reference to `boost::system::system_category()' SingleEyeFitterCmdLite.o: In function `mexFunction': SingleEyeFitterCmdLite.cpp:(.text+0x2dc2): undefined reference to `cv::VideoCapture::VideoCapture(int)' SingleEyeFitterCmdLite.cpp:(.text+0x2dce): undefined reference to `cv::VideoCapture::isOpened() const' SingleEyeFitterCmdLite.cpp:(.text+0x313a): undefined reference to `cv::VideoCapture::operator>>(cv::Mat&)' SingleEyeFitterCmdLite.cpp:(.text+0x3266): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x3c4b): undefined reference to `pupiltracker::findPupilEllipse(pupiltracker::TrackerParams const&, cv::Mat const&, pupiltracker::findPupilEllipse_out&, pupiltracker::tracker_log&)' SingleEyeFitterCmdLite.cpp:(.text+0x4252): undefined reference to `singleeyefitter::EyeModelFitter::EyeModelFitter(double, double, double)' SingleEyeFitterCmdLite.cpp:(.text+0x4276): undefined reference to `singleeyefitter::EyeModelFitter::EyeModelFitter(double, double, double)' SingleEyeFitterCmdLite.cpp:(.text+0x429a): undefined reference to `singleeyefitter::EyeModelFitter::EyeModelFitter(double, double, double)' SingleEyeFitterCmdLite.cpp:(.text+0x42be): undefined reference to `singleeyefitter::EyeModelFitter::EyeModelFitter(double, double, double)' SingleEyeFitterCmdLite.cpp:(.text+0x455e): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0x482e): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0x4b02): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0x4dd7): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0x4ec4): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0x4ee5): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0x4ef1): undefined reference to `singleeyefitter::EyeModelFitter::initialise_model()' SingleEyeFitterCmdLite.cpp:(.text+0x4f12): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0x4f1e): undefined reference to `singleeyefitter::EyeModelFitter::initialise_model()' SingleEyeFitterCmdLite.cpp:(.text+0x4f3f): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0x4f4b): undefined reference to `singleeyefitter::EyeModelFitter::initialise_model()' SingleEyeFitterCmdLite.cpp:(.text+0x5032): undefined reference to `cv::VideoWriter::VideoWriter()' SingleEyeFitterCmdLite.cpp:(.text+0x55b6): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x56ea): undefined reference to `cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)' SingleEyeFitterCmdLite.cpp:(.text+0x5d86): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x5f16): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x6070): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x6200): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x635a): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.o:SingleEyeFitterCmdLite.cpp:(.text+0x64ea): more undefined references to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' follow SingleEyeFitterCmdLite.o: In function `mexFunction': SingleEyeFitterCmdLite.cpp:(.text+0x6bcc): undefined reference to `cv::polylines(cv::_InputOutputArray const&, cv::_InputArray const&, bool, cv::Scalar_<double> const&, int, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x6c82): undefined reference to `cv::polylines(cv::_InputOutputArray const&, cv::_InputArray const&, bool, cv::Scalar_<double> const&, int, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0x9582): undefined reference to `cv::VideoWriter::isOpened() const' SingleEyeFitterCmdLite.cpp:(.text+0x9599): undefined reference to `cv::VideoWriter::operator<<(cv::Mat const&)' SingleEyeFitterCmdLite.cpp:(.text+0xa097): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0xa29f): undefined reference to `cv::accumulate(cv::_InputArray const&, cv::_InputOutputArray const&, cv::_InputArray const&)' SingleEyeFitterCmdLite.cpp:(.text+0xa76f): undefined reference to `cv::accumulate(cv::_InputArray const&, cv::_InputOutputArray const&, cv::_InputArray const&)' SingleEyeFitterCmdLite.cpp:(.text+0xb35a): undefined reference to `cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0xb5b8): undefined reference to `cv::accumulate(cv::_InputArray const&, cv::_InputOutputArray const&, cv::_InputArray const&)' SingleEyeFitterCmdLite.cpp:(.text+0xbc88): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0xbd02): undefined reference to `cv::accumulate(cv::_InputArray const&, cv::_InputOutputArray const&, cv::_InputArray const&)' SingleEyeFitterCmdLite.cpp:(.text+0xbfea): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0xc064): undefined reference to `cv::accumulate(cv::_InputArray const&, cv::_InputOutputArray const&, cv::_InputArray const&)' SingleEyeFitterCmdLite.cpp:(.text+0xc34c): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' SingleEyeFitterCmdLite.cpp:(.text+0xc3c6): undefined reference to `cv::accumulate(cv::_InputArray const&, cv::_InputOutputArray const&, cv::_InputArray const&)' SingleEyeFitterCmdLite.cpp:(.text+0xccc8): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0xcd1b): undefined reference to `singleeyefitter::EyeModelFitter::unproject_single_observation(unsigned long, double)' SingleEyeFitterCmdLite.cpp:(.text+0xcda5): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0xcdfb): undefined reference to `singleeyefitter::EyeModelFitter::unproject_single_observation(unsigned long, double)' SingleEyeFitterCmdLite.cpp:(.text+0xce0a): undefined reference to `singleeyefitter::EyeModelFitter::initialise_single_observation(unsigned long)' SingleEyeFitterCmdLite.cpp:(.text+0xce94): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0xceea): undefined reference to `singleeyefitter::EyeModelFitter::unproject_single_observation(unsigned long, double)' SingleEyeFitterCmdLite.cpp:(.text+0xcef9): undefined reference to `singleeyefitter::EyeModelFitter::initialise_single_observation(unsigned long)' SingleEyeFitterCmdLite.cpp:(.text+0xcf08): undefined reference to `singleeyefitter::EyeModelFitter::refine_single_with_contrast(unsigned long)' SingleEyeFitterCmdLite.cpp:(.text+0xcf94): undefined reference to `singleeyefitter::EyeModelFitter::add_observation(cv::Mat, singleeyefitter::Ellipse2D<double>, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > >)' SingleEyeFitterCmdLite.cpp:(.text+0xcfea): undefined reference to `singleeyefitter::EyeModelFitter::unproject_single_observation(unsigned long, double)' SingleEyeFitterCmdLite.cpp:(.text+0xcff9): undefined reference to `singleeyefitter::EyeModelFitter::initialise_single_observation(unsigned long)' SingleEyeFitterCmdLite.cpp:(.text+0xd0b3): undefined reference to `singleeyefitter::EyeModelFitter::refine_single_with_contrast(unsigned long)' SingleEyeFitterCmdLite.cpp:(.text+0xd162): undefined reference to `singleeyefitter::EyeModelFitter::refine_single_with_contrast(unsigned long)' SingleEyeFitterCmdLite.cpp:(.text+0xd175): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xd1d6): undefined reference to `singleeyefitter::EyeModelFitter::refine_with_region_contrast(std::function<void (singleeyefitter::Sphere<double> const&, std::vector<singleeyefitter::Circle3D<double>, std::allocator<singleeyefitter::Circle3D<double> > > const&)> const&)' SingleEyeFitterCmdLite.cpp:(.text+0xd213): undefined reference to `singleeyefitter::EyeModelFitter::refine_with_region_contrast(std::function<void (singleeyefitter::Sphere<double> const&, std::vector<singleeyefitter::Circle3D<double>, std::allocator<singleeyefitter::Circle3D<double> > > const&)> const&)' SingleEyeFitterCmdLite.cpp:(.text+0xd4eb): undefined reference to `singleeyefitter::EyeModelFitter::PupilParams::PupilParams(double, double, double)' SingleEyeFitterCmdLite.cpp:(.text+0xd5a8): undefined reference to `singleeyefitter::EyeModelFitter::single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xd7dd): undefined reference to `singleeyefitter::EyeModelFitter::single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xda1a): undefined reference to `singleeyefitter::EyeModelFitter::PupilParams::PupilParams(double, double, double)' SingleEyeFitterCmdLite.cpp:(.text+0xdb05): undefined reference to `singleeyefitter::EyeModelFitter::refine_single_with_contrast(unsigned long)' SingleEyeFitterCmdLite.cpp:(.text+0xdb18): undefined reference to `singleeyefitter::EyeModelFitter::single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xdcc0): undefined reference to `singleeyefitter::EyeModelFitter::circleFromParams(singleeyefitter::EyeModelFitter::PupilParams const&) const' SingleEyeFitterCmdLite.cpp:(.text+0xdf21): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0xdf3f): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0xdf4b): undefined reference to `singleeyefitter::EyeModelFitter::initialise_model()' SingleEyeFitterCmdLite.cpp:(.text+0xdf69): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0xdf75): undefined reference to `singleeyefitter::EyeModelFitter::initialise_model()' SingleEyeFitterCmdLite.cpp:(.text+0xdf93): undefined reference to `singleeyefitter::EyeModelFitter::unproject_observations(double, double, bool)' SingleEyeFitterCmdLite.cpp:(.text+0xdf9f): undefined reference to `singleeyefitter::EyeModelFitter::initialise_model()' SingleEyeFitterCmdLite.cpp:(.text+0xe022): undefined reference to `singleeyefitter::EyeModelFitter::circleFromParams(singleeyefitter::EyeModelFitter::PupilParams const&) const' SingleEyeFitterCmdLite.cpp:(.text+0xe147): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xe1f3): undefined reference to `singleeyefitter::EyeModelFitter::circleFromParams(singleeyefitter::EyeModelFitter::PupilParams const&) const' SingleEyeFitterCmdLite.cpp:(.text+0xe318): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xe386): undefined reference to `singleeyefitter::EyeModelFitter::circleFromParams(singleeyefitter::EyeModelFitter::PupilParams const&) const' SingleEyeFitterCmdLite.cpp:(.text+0xe4ab): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xe50a): undefined reference to `singleeyefitter::EyeModelFitter::circleFromParams(singleeyefitter::EyeModelFitter::PupilParams const&) const' SingleEyeFitterCmdLite.cpp:(.text+0xe62f): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xe6e7): undefined reference to `singleeyefitter::EyeModelFitter::circleFromParams(singleeyefitter::EyeModelFitter::PupilParams const&) const' SingleEyeFitterCmdLite.cpp:(.text+0xe80c): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xe87a): undefined reference to `singleeyefitter::EyeModelFitter::circleFromParams(singleeyefitter::EyeModelFitter::PupilParams const&) const' SingleEyeFitterCmdLite.cpp:(.text+0xe99f): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xea04): undefined reference to `singleeyefitter::EyeModelFitter::refine_with_inliers(std::function<void (singleeyefitter::Sphere<double> const&, std::vector<singleeyefitter::Circle3D<double>, std::allocator<singleeyefitter::Circle3D<double> > > const&)> const&)' SingleEyeFitterCmdLite.cpp:(.text+0xea57): undefined reference to `singleeyefitter::EyeModelFitter::refine_with_inliers(std::function<void (singleeyefitter::Sphere<double> const&, std::vector<singleeyefitter::Circle3D<double>, std::allocator<singleeyefitter::Circle3D<double> > > const&)> const&)' SingleEyeFitterCmdLite.cpp:(.text+0xeaa4): undefined reference to `cv::VideoWriter::isOpened() const' SingleEyeFitterCmdLite.cpp:(.text+0xec0a): undefined reference to `cv::VideoWriter::open(cv::String const&, int, double, cv::Size_<int>, bool)' SingleEyeFitterCmdLite.cpp:(.text+0xecb6): undefined reference to `cv::VideoWriter::release()' SingleEyeFitterCmdLite.cpp:(.text+0xede5): undefined reference to `singleeyefitter::EyeModelFitter::print_single_contrast_metric(unsigned long) const' SingleEyeFitterCmdLite.cpp:(.text+0xf484): undefined reference to `cv::VideoWriter::~VideoWriter()' SingleEyeFitterCmdLite.cpp:(.text+0xf5fb): undefined reference to `cv::VideoCapture::~VideoCapture()' SingleEyeFitterCmdLite.cpp:(.text+0x10aa6): undefined reference to `cv::VideoWriter::~VideoWriter()' SingleEyeFitterCmdLite.cpp:(.text+0x10c4a): undefined reference to `cv::VideoCapture::~VideoCapture()' SingleEyeFitterCmdLite.cpp:(.text+0x10d08): undefined reference to `cv::polylines(cv::_InputOutputArray const&, cv::_InputArray const&, bool, cv::Scalar_<double> const&, int, int, int)' SingleEyeFitterCmdLite.o: In function `boost::filesystem::operator/(boost::filesystem::path const&, boost::filesystem::path const&)': SingleEyeFitterCmdLite.cpp:(.text._ZN5boost10filesystemdvERKNS0_4pathES3_[_ZN5boost10filesystemdvERKNS0_4pathES3_]+0x22): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)' SingleEyeFitterCmdLite.o: In function `singleeyefitter::cvx::line(cv::Mat&, cv::Point_<float>, cv::Point_<float>, cv::Scalar_<double>, int, int, int)': SingleEyeFitterCmdLite.cpp:(.text._ZN15singleeyefitter3cvx4lineERN2cv3MatENS1_6Point_IfEES5_NS1_7Scalar_IdEEiii[_ZN15singleeyefitter3cvx4lineERN2cv3MatENS1_6Point_IfEES5_NS1_7Scalar_IdEEiii]+0x87): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)' SingleEyeFitterCmdLite.o: In function `boost::filesystem::path::path<char*>(char* const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<char*>::type>, void>::type*)': SingleEyeFitterCmdLite.cpp:(.text._ZN5boost10filesystem4pathC2IPcEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE[_ZN5boost10filesystem4pathC5IPcEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE]+0x25): undefined reference to `boost::filesystem::path::codecvt()' collect2: error: ld returned 1 exit status
mex: link of ' "SingleEyeFitterCmdLite.mexa64"' failed.
Unable to complete successfully. end

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by