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

  • SEARCH
  • Home
  • 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 448937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:43:10+00:00 2026-05-12T21:43:10+00:00

I have noticed that MATLAB provides the BLAS and LAPACK headers among others: $

  • 0

I have noticed that MATLAB provides the BLAS and LAPACK headers among others:

$ ls ${MATLAB_DIR}/extern/include/
blas.h            engine.h    lapack.h           mat.h            mclmcr.h      mex.h           mwutil.h
blascompat32.h    fintrf.h    libmatlbm.mlib     matrix.h         mclmcrrt.h    mwdebug.h       tmwtypes.h
emlrt.h           io64.h      libmatlbmx.mlib    mclcppclass.h    mcr.h         mwservices.h

I would like to use them for my compiled code, so I tried to compile the following:

ex_blas.c

#include <blas.h>

int main()
{
    return 0;
}

with the following command:

$ mex ex_blas.c

But this returns an error:

In file included from ex_blas.c:1:
/Applications/MATLAB_R2009b.app/extern/include/blas.h:51: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:62: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:77: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:92: error: syntax error before ‘*’ token
/Applications/MATLAB_R2009b.app/extern/include/blas.h:103: error: syntax error before ‘ptrdiff_t’
/Applications/MATLAB_R2009b.app/extern/include/blas.h:122: error: syntax error before ‘ptrdiff_t’

Is the blas.h provided by MATLAB usable by a 3rd party application outside of MATLAB? If yes, what is causing the error above?

  • 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-05-12T21:43:10+00:00Added an answer on May 12, 2026 at 9:43 pm

    I’m not sure if it will completely resolve your problems, but you may also have to include stddef.h since that is where the ptrdiff_t type is defined.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When plotting on a figure in MATLAB, I have noticed that parts of the
I have noticed that matlab does some matrix function really fast for example adding
i have noticed that #include <iostream> #include <boost/array.hpp> #include <boost/asio.hpp> using boost::asio::ip::tcp; int main(int
I have noticed that MATLAB sometimes displays my colors incorrectly. I'm not sure if
I have noticed that it is possible to define a custom class and then
I have noticed that most Objective-C coders never use the self->ivar syntax when accessing
I have noticed that my application's Document folder is sometimes different. The workflow was
I have noticed that doing actions like implementing an interface, that a small rectangle
I have noticed that the Windows Vista/7 dialogs look MUCH better than just a
I have noticed that after awhile of debug/tweakcode/debug etc that eventually Silverlight starts to

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.