Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9238407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:45:18+00:00 2026-06-18T07:45:18+00:00

I am trying to compile a C file using mex (MATLAB 2012b on MacOSX

  • 0

I am trying to compile a C file using mex (MATLAB 2012b on MacOSX Lion). My project consists of three files:

  1. The Header File where the main functionality is defined, smdvquad.h
  2. The C implementation of smdvquad.h, namely smdvquad.c which #includes smdvquad.h and
  3. A C file containing the “mexFunction”, namely mxsmdvquad.c which #includes smdvquad.h

The whole project compiles absolutely fine on Netbeans, but when I try to compile it using mex on MATLAB, i.e. using the command:

mex -largeArrayDims mxsmdvquad.c

the following error is thrown:

>> mex -largeArrayDims mxsmdvquad.c
Undefined symbols for architecture x86_64:
  "_smdv_quad", referenced from:
      _mexFunction in mxsmdvquad.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

    mex: link of ' "mxsmdvquad.mexmaci64"' failed.

Error using mex (line 206)
Unable to complete successfully.

I have also tried specifying the working directory using the -I mex-argument, i.e.

mex -largeArrayDims -I/path/to/my/project/ mxsmdvquad.c

but in vain!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:45:19+00:00Added an answer on June 18, 2026 at 7:45 am

    I would expect that one of the following would work:

    Maybe you also need to compile smdvquad.c?

    mex -largeArrayDims mxsmdvquad.c smdvquad.c
    

    or if you already compiled smdvquad, you maybe need to link it:

    mex -largeArrayDims mxsmdvquad.c smdvquad.o
    

    or if it’s in a different directory, you need to add the directory to the linker with -L:

    mex -largeArrayDims -L/path/to/project mxsmdvquad.c smdvquad.o
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to compile some files using cygwin shell. java file that I
I am trying to compile a basic c++ .mex and .oct file using the
I am trying to compile a mex library using MATLAB under Ubuntu. I fet
I'm trying to compile (using cygwin) a C header file that includes netinet/ether.h. On
I am trying to create a java header file. I compiled the project in
I'm trying to compile a .cs file using a CSharpCodeProvider from a .net 3.5
I'm trying to compile my first .ui file using PyQt4 on a mac with
I am trying to compile go file using gccgo , i installed on my
I am trying to compile an object file using the code below. //--Begin test.cpp
I'm trying to compile IL code using bat file and C#. Here is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.