How to fix 'unknown type name' error when linking GSL library to Matlab MEXUsing GNU Scientific Library (GSL) under Windows x64 with MinGWDifference between size_t and mwSize when compiling C MEX-files for Matlaberror in unravel function for linking and decoding in huffman using matlabStandard C libraries not found when compiling mex files in MatlabLinking errors from MATLAB Mex libraryMatlab mex linker error with qt 5Linking C++ to Matlab via mex: passing argumentsError in Mex file Execution, Matlab windowsCompiling libraries with MEX in MATLABBuilding mex file (mexgdal) in Visual Studio or Matlab (same errors: LNK2001 unresolved external symbol)?GNU GMP with Matlab and mex - Library Problems

Automatic Habit of Meditation

Trapped in an ocean Temple in Minecraft?

What are the exact meanings of roll, pitch and yaw?

Difficulty pronouncing "maths", "baths", "hundredths", "sixths"

expansion with *.txt in the shell doesn't work if no .txt file exists

How do campaign rallies gain candidates votes?

Memory capability and powers of 2

How do I address my Catering staff subordinate seen eating from a chafing dish before the customers?

What to do when you reach a conclusion and find out later on that someone else already did?

Is dd if=/dev/urandom of=/dev/mem safe?

Why isn't there a serious attempt at creating a third mass-appeal party in the US?

Terence Tao–type books in other fields?

(1 of 11: Numberlink) What is Pyramid Cult's Favorite Activity?

How did C64 games handle music during gameplay?

This message is flooding my syslog, how to find where it comes from?

Examples of simultaneous independent breakthroughs

Is there a reason why I should not use the HaveIBeenPwned API to warn users about exposed passwords?

Print sums of all subsets

A fictional island on Earth with "longer" springs and autumns

How can I prevent corporations from growing their own workforce?

powerhouse of ideas

TSA asking to see cell phone

Why did Saturn V not head straight to the moon?

Spoken encryption



How to fix 'unknown type name' error when linking GSL library to Matlab MEX


Using GNU Scientific Library (GSL) under Windows x64 with MinGWDifference between size_t and mwSize when compiling C MEX-files for Matlaberror in unravel function for linking and decoding in huffman using matlabStandard C libraries not found when compiling mex files in MatlabLinking errors from MATLAB Mex libraryMatlab mex linker error with qt 5Linking C++ to Matlab via mex: passing argumentsError in Mex file Execution, Matlab windowsCompiling libraries with MEX in MATLABBuilding mex file (mexgdal) in Visual Studio or Matlab (same errors: LNK2001 unresolved external symbol)?GNU GMP with Matlab and mex - Library Problems






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am currently trying to optimize some code I am working on in MATLAB (version R2019a). To compute my results, MATLAB has to compute a certain function a lot of times, slowing down everything. Because of this, I thought writing this function in C and importing this into MATLAB would speed things up a lot. Unfortunately I ran in some troubles by trying to compile the C-code into MATLAB using MEX.



I have used C before, but am certainly not an expert. Anyway I've tested the code in C and it works, the problem lies in trying to compile the code in MATLAB. I am using the GNU Scientific Library (GSL) and should thus include the libraries in compiling with MEX in MATLAB.



The following is a minimal working example leading to the same problems and errors. The C-code looks something like this, saved in MWE.c



#include "mex.h" // The mex library
#include <gsl/gsl_sf_bessel.h> // GSL function

// Define some function, in my case this is somewhat more complicated
double bessel_fun (double *x)

return gsl_sf_bessel_J0 (*x);


// MEX function needed for compiling in MATLAB
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])

//declare variables
mxArray *x_M, *y_M;
double *x, *y;

//associate inputs
x_M = mxDuplicateArray(prhs[0]);

//associate outputs
y_M = plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL);

// Access variables
x = mxGetPr(x_M);
y = mxGetPr(y_M);

// Save the result in the output variable
y[0]=bessel_fun(x);



I then compile in MATLAB using



 mex -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c


Instead of compiling (which does work if I use C-code without including any libraries), MATLAB returns a lot of errors, as follows:



Error using mex
In file included from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/stddef.h:7:0,
from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/lib/gcc/x86_64-w64-mingw32/6.3.0/include/stddef.h:1,
from C:MinGWinclude/stdio.h:68,
from C:Program FilesMATLABR2019a/extern/include/mex.h:38,
from C:userpathMWE.c:1:
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:35:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef unsigned __int64 size_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:45:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef __int64 ssize_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:52:9:
error: unknown type name 'size_t'
typedef size_t rsize_t;

[...]


and the same error on different type names.



Does anyone have an idea how to correctly include the libraries when compiling with MEX in MATLAB?










share|improve this question






















  • How did you get your gsl version on your machine? Did you build it yourself? Have you considered using the binary distribution vs 2.2.1?

    – Kaveh Vahedipour
    Mar 27 at 9:42











  • I downloaded the most recent version of GSL and installed it following the answer found here. It works perfectly if I just compile the C-code with gcc, but not in Matlab

    – SevenpH
    Mar 27 at 12:13











  • What version of MinGW is installed?

    – Kaveh Vahedipour
    Mar 27 at 13:34











  • I am using the most recent MinGW.org GCC-8.2.0-3 for compiling C. Matlab uses MinGW GCC 6.3 from mingw-w64.org (according to the documentation Could it have something to do with 32bit/64bit versions? Then again, the Matlab compiler works if I don't include any GSL libraries.

    – SevenpH
    Mar 27 at 13:55












  • Thats why i was asking. You need the 64 bit version of course. size_t is otherwise undefined

    – Kaveh Vahedipour
    Mar 27 at 13:56

















1















I am currently trying to optimize some code I am working on in MATLAB (version R2019a). To compute my results, MATLAB has to compute a certain function a lot of times, slowing down everything. Because of this, I thought writing this function in C and importing this into MATLAB would speed things up a lot. Unfortunately I ran in some troubles by trying to compile the C-code into MATLAB using MEX.



I have used C before, but am certainly not an expert. Anyway I've tested the code in C and it works, the problem lies in trying to compile the code in MATLAB. I am using the GNU Scientific Library (GSL) and should thus include the libraries in compiling with MEX in MATLAB.



The following is a minimal working example leading to the same problems and errors. The C-code looks something like this, saved in MWE.c



#include "mex.h" // The mex library
#include <gsl/gsl_sf_bessel.h> // GSL function

// Define some function, in my case this is somewhat more complicated
double bessel_fun (double *x)

return gsl_sf_bessel_J0 (*x);


// MEX function needed for compiling in MATLAB
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])

//declare variables
mxArray *x_M, *y_M;
double *x, *y;

//associate inputs
x_M = mxDuplicateArray(prhs[0]);

//associate outputs
y_M = plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL);

// Access variables
x = mxGetPr(x_M);
y = mxGetPr(y_M);

// Save the result in the output variable
y[0]=bessel_fun(x);



I then compile in MATLAB using



 mex -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c


Instead of compiling (which does work if I use C-code without including any libraries), MATLAB returns a lot of errors, as follows:



Error using mex
In file included from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/stddef.h:7:0,
from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/lib/gcc/x86_64-w64-mingw32/6.3.0/include/stddef.h:1,
from C:MinGWinclude/stdio.h:68,
from C:Program FilesMATLABR2019a/extern/include/mex.h:38,
from C:userpathMWE.c:1:
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:35:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef unsigned __int64 size_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:45:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef __int64 ssize_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:52:9:
error: unknown type name 'size_t'
typedef size_t rsize_t;

[...]


and the same error on different type names.



Does anyone have an idea how to correctly include the libraries when compiling with MEX in MATLAB?










share|improve this question






















  • How did you get your gsl version on your machine? Did you build it yourself? Have you considered using the binary distribution vs 2.2.1?

    – Kaveh Vahedipour
    Mar 27 at 9:42











  • I downloaded the most recent version of GSL and installed it following the answer found here. It works perfectly if I just compile the C-code with gcc, but not in Matlab

    – SevenpH
    Mar 27 at 12:13











  • What version of MinGW is installed?

    – Kaveh Vahedipour
    Mar 27 at 13:34











  • I am using the most recent MinGW.org GCC-8.2.0-3 for compiling C. Matlab uses MinGW GCC 6.3 from mingw-w64.org (according to the documentation Could it have something to do with 32bit/64bit versions? Then again, the Matlab compiler works if I don't include any GSL libraries.

    – SevenpH
    Mar 27 at 13:55












  • Thats why i was asking. You need the 64 bit version of course. size_t is otherwise undefined

    – Kaveh Vahedipour
    Mar 27 at 13:56













1












1








1








I am currently trying to optimize some code I am working on in MATLAB (version R2019a). To compute my results, MATLAB has to compute a certain function a lot of times, slowing down everything. Because of this, I thought writing this function in C and importing this into MATLAB would speed things up a lot. Unfortunately I ran in some troubles by trying to compile the C-code into MATLAB using MEX.



I have used C before, but am certainly not an expert. Anyway I've tested the code in C and it works, the problem lies in trying to compile the code in MATLAB. I am using the GNU Scientific Library (GSL) and should thus include the libraries in compiling with MEX in MATLAB.



The following is a minimal working example leading to the same problems and errors. The C-code looks something like this, saved in MWE.c



#include "mex.h" // The mex library
#include <gsl/gsl_sf_bessel.h> // GSL function

// Define some function, in my case this is somewhat more complicated
double bessel_fun (double *x)

return gsl_sf_bessel_J0 (*x);


// MEX function needed for compiling in MATLAB
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])

//declare variables
mxArray *x_M, *y_M;
double *x, *y;

//associate inputs
x_M = mxDuplicateArray(prhs[0]);

//associate outputs
y_M = plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL);

// Access variables
x = mxGetPr(x_M);
y = mxGetPr(y_M);

// Save the result in the output variable
y[0]=bessel_fun(x);



I then compile in MATLAB using



 mex -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c


Instead of compiling (which does work if I use C-code without including any libraries), MATLAB returns a lot of errors, as follows:



Error using mex
In file included from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/stddef.h:7:0,
from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/lib/gcc/x86_64-w64-mingw32/6.3.0/include/stddef.h:1,
from C:MinGWinclude/stdio.h:68,
from C:Program FilesMATLABR2019a/extern/include/mex.h:38,
from C:userpathMWE.c:1:
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:35:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef unsigned __int64 size_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:45:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef __int64 ssize_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:52:9:
error: unknown type name 'size_t'
typedef size_t rsize_t;

[...]


and the same error on different type names.



Does anyone have an idea how to correctly include the libraries when compiling with MEX in MATLAB?










share|improve this question














I am currently trying to optimize some code I am working on in MATLAB (version R2019a). To compute my results, MATLAB has to compute a certain function a lot of times, slowing down everything. Because of this, I thought writing this function in C and importing this into MATLAB would speed things up a lot. Unfortunately I ran in some troubles by trying to compile the C-code into MATLAB using MEX.



I have used C before, but am certainly not an expert. Anyway I've tested the code in C and it works, the problem lies in trying to compile the code in MATLAB. I am using the GNU Scientific Library (GSL) and should thus include the libraries in compiling with MEX in MATLAB.



The following is a minimal working example leading to the same problems and errors. The C-code looks something like this, saved in MWE.c



#include "mex.h" // The mex library
#include <gsl/gsl_sf_bessel.h> // GSL function

// Define some function, in my case this is somewhat more complicated
double bessel_fun (double *x)

return gsl_sf_bessel_J0 (*x);


// MEX function needed for compiling in MATLAB
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])

//declare variables
mxArray *x_M, *y_M;
double *x, *y;

//associate inputs
x_M = mxDuplicateArray(prhs[0]);

//associate outputs
y_M = plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL);

// Access variables
x = mxGetPr(x_M);
y = mxGetPr(y_M);

// Save the result in the output variable
y[0]=bessel_fun(x);



I then compile in MATLAB using



 mex -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c


Instead of compiling (which does work if I use C-code without including any libraries), MATLAB returns a lot of errors, as follows:



Error using mex
In file included from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/stddef.h:7:0,
from
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/lib/gcc/x86_64-w64-mingw32/6.3.0/include/stddef.h:1,
from C:MinGWinclude/stdio.h:68,
from C:Program FilesMATLABR2019a/extern/include/mex.h:38,
from C:userpathMWE.c:1:
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:35:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef unsigned __int64 size_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:45:19:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
__MINGW_EXTENSION typedef __int64 ssize_t;
^~~~~~~
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/mingw_w64.instrset/x86_64-w64-mingw32/include/crtdefs.h:52:9:
error: unknown type name 'size_t'
typedef size_t rsize_t;

[...]


and the same error on different type names.



Does anyone have an idea how to correctly include the libraries when compiling with MEX in MATLAB?







c matlab mex gsl






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 16:52









SevenpHSevenpH

62 bronze badges




62 bronze badges












  • How did you get your gsl version on your machine? Did you build it yourself? Have you considered using the binary distribution vs 2.2.1?

    – Kaveh Vahedipour
    Mar 27 at 9:42











  • I downloaded the most recent version of GSL and installed it following the answer found here. It works perfectly if I just compile the C-code with gcc, but not in Matlab

    – SevenpH
    Mar 27 at 12:13











  • What version of MinGW is installed?

    – Kaveh Vahedipour
    Mar 27 at 13:34











  • I am using the most recent MinGW.org GCC-8.2.0-3 for compiling C. Matlab uses MinGW GCC 6.3 from mingw-w64.org (according to the documentation Could it have something to do with 32bit/64bit versions? Then again, the Matlab compiler works if I don't include any GSL libraries.

    – SevenpH
    Mar 27 at 13:55












  • Thats why i was asking. You need the 64 bit version of course. size_t is otherwise undefined

    – Kaveh Vahedipour
    Mar 27 at 13:56

















  • How did you get your gsl version on your machine? Did you build it yourself? Have you considered using the binary distribution vs 2.2.1?

    – Kaveh Vahedipour
    Mar 27 at 9:42











  • I downloaded the most recent version of GSL and installed it following the answer found here. It works perfectly if I just compile the C-code with gcc, but not in Matlab

    – SevenpH
    Mar 27 at 12:13











  • What version of MinGW is installed?

    – Kaveh Vahedipour
    Mar 27 at 13:34











  • I am using the most recent MinGW.org GCC-8.2.0-3 for compiling C. Matlab uses MinGW GCC 6.3 from mingw-w64.org (according to the documentation Could it have something to do with 32bit/64bit versions? Then again, the Matlab compiler works if I don't include any GSL libraries.

    – SevenpH
    Mar 27 at 13:55












  • Thats why i was asking. You need the 64 bit version of course. size_t is otherwise undefined

    – Kaveh Vahedipour
    Mar 27 at 13:56
















How did you get your gsl version on your machine? Did you build it yourself? Have you considered using the binary distribution vs 2.2.1?

– Kaveh Vahedipour
Mar 27 at 9:42





How did you get your gsl version on your machine? Did you build it yourself? Have you considered using the binary distribution vs 2.2.1?

– Kaveh Vahedipour
Mar 27 at 9:42













I downloaded the most recent version of GSL and installed it following the answer found here. It works perfectly if I just compile the C-code with gcc, but not in Matlab

– SevenpH
Mar 27 at 12:13





I downloaded the most recent version of GSL and installed it following the answer found here. It works perfectly if I just compile the C-code with gcc, but not in Matlab

– SevenpH
Mar 27 at 12:13













What version of MinGW is installed?

– Kaveh Vahedipour
Mar 27 at 13:34





What version of MinGW is installed?

– Kaveh Vahedipour
Mar 27 at 13:34













I am using the most recent MinGW.org GCC-8.2.0-3 for compiling C. Matlab uses MinGW GCC 6.3 from mingw-w64.org (according to the documentation Could it have something to do with 32bit/64bit versions? Then again, the Matlab compiler works if I don't include any GSL libraries.

– SevenpH
Mar 27 at 13:55






I am using the most recent MinGW.org GCC-8.2.0-3 for compiling C. Matlab uses MinGW GCC 6.3 from mingw-w64.org (according to the documentation Could it have something to do with 32bit/64bit versions? Then again, the Matlab compiler works if I don't include any GSL libraries.

– SevenpH
Mar 27 at 13:55














Thats why i was asking. You need the 64 bit version of course. size_t is otherwise undefined

– Kaveh Vahedipour
Mar 27 at 13:56





Thats why i was asking. You need the 64 bit version of course. size_t is otherwise undefined

– Kaveh Vahedipour
Mar 27 at 13:56












1 Answer
1






active

oldest

votes


















0














Gotcha. Could you try the following please:



mex -U__MINGW_EXTENSION -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c





share|improve this answer























  • Thank you for the answer. I've tried it, and I still get the same errors of unknown type names.

    – SevenpH
    Mar 27 at 13:25










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55362414%2fhow-to-fix-unknown-type-name-error-when-linking-gsl-library-to-matlab-mex%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Gotcha. Could you try the following please:



mex -U__MINGW_EXTENSION -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c





share|improve this answer























  • Thank you for the answer. I've tried it, and I still get the same errors of unknown type names.

    – SevenpH
    Mar 27 at 13:25















0














Gotcha. Could you try the following please:



mex -U__MINGW_EXTENSION -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c





share|improve this answer























  • Thank you for the answer. I've tried it, and I still get the same errors of unknown type names.

    – SevenpH
    Mar 27 at 13:25













0












0








0







Gotcha. Could you try the following please:



mex -U__MINGW_EXTENSION -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c





share|improve this answer













Gotcha. Could you try the following please:



mex -U__MINGW_EXTENSION -IC:/MinGW/include -LC:/MinGW/lib -lgsl -lgslcblas MWE.c






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 12:58









Kaveh VahedipourKaveh Vahedipour

2,5401 gold badge6 silver badges17 bronze badges




2,5401 gold badge6 silver badges17 bronze badges












  • Thank you for the answer. I've tried it, and I still get the same errors of unknown type names.

    – SevenpH
    Mar 27 at 13:25

















  • Thank you for the answer. I've tried it, and I still get the same errors of unknown type names.

    – SevenpH
    Mar 27 at 13:25
















Thank you for the answer. I've tried it, and I still get the same errors of unknown type names.

– SevenpH
Mar 27 at 13:25





Thank you for the answer. I've tried it, and I still get the same errors of unknown type names.

– SevenpH
Mar 27 at 13:25






Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55362414%2fhow-to-fix-unknown-type-name-error-when-linking-gsl-library-to-matlab-mex%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript