Why do I receive C++ linking errors using the MATLAB Compiler on Redhat/Mandrake Linux?
Afficher commentaires plus anciens
Why do I receive C++ linking errors using the MATLAB Compiler on Redhat/Mandrake Linux?
When I do the following:
/usr/matlab/bin/mbuild -v ex1.cpp
I receive the following errors:
ex1.o(.text+0x41): In function `main':
: undefined reference to `mwArray::mwArray[in-charge](int, int, double*, double*, int)'ex1.o(.text+0x5a): In function `main':
: undefined reference to `mwArray::mwArray[in-charge](int, int, double*, double*, int)'ex1.o(.text+0x68): In function `main':
: undefined reference to `mwArray::Write(std::basic_ostream<char, std::char_traits<char> >&) const'ex1.o(.text+0x88): In function `main':
: undefined reference to `mwArray::Write(std::basic_ostream<char, std::char_traits<char> >&) const'ex1.o(.text+0xcd): In function `main':
: undefined reference to `mwArray::Read(std::basic_istream<char, std::char_traints<char> >&, int)'ex1.o(.text+0xdb): In function `main':
: undefined reference to `mwArray::Write(std::basic_ostream<char, std::char_traits<char> >&) const'ex1.o(.text+0x25d): In function _static_initialization_and_destruction_0(int, int)':
: undefined reference to `mwLibraryInitBuiltins::mwLibraryInitBuiltins[in-charge]()'ex1.o(.text+0x2bc): In function `__tcf_0':
: undefined reference to `mwLibraryInitBuiltins::~mwLibraryInitBuiltins [in-charge]()'collect2
: ld returned 1 exit status
mbuild: link of 'ex1' failed.
Or, I might see:
/usr/lib/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':
elf-init.oS(.text+0xb): undefined reference to `__init_array_end'
elf-init.oS(.text+0x10): undefined reference to `__init_array_start'
elf-init.oS(.text+0x23): undefined reference to `__init_array_start'/usr/lib/libc_nonshared.a(elf-init.oS): In function `__libc_csu_fini':
elf-init.oS(.text+0x36): undefined reference to `__fini_array_end'
elf-init.oS(.text+0x3b): undefined reference to `__fini_array_start'
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deploy to C++ Applications Using MATLAB Data API (C++11) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!