Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error in Matlab #36

Open
tybtch opened this issue Jul 12, 2020 · 1 comment
Open

Compiling error in Matlab #36

tybtch opened this issue Jul 12, 2020 · 1 comment

Comments

@tybtch
Copy link

tybtch commented Jul 12, 2020

I am using Win10 and Matlab 2019a. I compiled the files using Cygwin and installed the MinGW64 Compiler in Matlab. However, when I proceeded to use make_scs in Matlab command window, the following error occurred:

F:\superscs\src\linAlg.c:36:56: error: expected identifier before ')' token
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:38:16: note: in expansion of macro 'SCS_IAMAX'
extern blasint SCS_IAMAX(
^
F:\superscs\src\linAlg.c:36:19: error: 'stitch__' declared as function returning a function
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:36:19: note: in definition of macro 'SCS_IAMAX'
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^~~~~~~~
F:\superscs\src\linAlg.c:41:9: warning: parameter names (without types) in function declaration
const blasint inc_x);
^~~~~
F:\superscs\src\linAlg.c:85:13: error: 'LPCK' declared as function returning a function
extern void LPCK(gels)(
^~~~
F:\superscs\src\linAlg.c:96:9: warning: parameter names (without types) in function declaration
blasint
info);
^~~~~~~
F:\superscs\src\linAlg.c:98:13: error: 'LPCK' declared as function returning a function
extern void LPCK(gelss)(
^~~~
F:\superscs\src\linAlg.c:111:9: warning: parameter names (without types) in function declaration
blasint* info);
^~~~~~~
In file included from F:\superscs\include/cones.h:36:0,
from F:\superscs\include/scs.h:33,
from F:\superscs\include/linAlg.h:35,
from F:\superscs\src\linAlg.c:28:
F:\superscs\src\linAlg.c: In function 'scs_norm':
F:\superscs\include/scs_blas.h:46:17: warning: implicit declaration of function 'dnrm2'
[-Wimplicit-function-declaration]
#define BLAS(x) d##x
^
F:\superscs\src\linAlg.c:114:20: note: in expansion of macro 'BLAS'
#define scs_nrm2_ BLAS(nrm2)
^~~~
F:\superscs\src\linAlg.c:681:12: note: in expansion of macro 'scs_nrm2_'
return scs_nrm2_(&len_, v, &one);
^
F:\superscs\src\linAlg.c: In function 'scs_norm_infinity':
F:\superscs\src\linAlg.c:36:28: error: 'i' undeclared (first use in this function)
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
F:\superscs\src\linAlg.c:36:28: note: each undeclared identifier is reported only once for each function it appears in
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
In file included from F:\superscs\include/cones.h:36:0,
from F:\superscs\include/scs.h:33,
from F:\superscs\include/linAlg.h:35,
from F:\superscs\src\linAlg.c:28:
F:\superscs\include/scs_blas.h:46:17: error: 'damax' undeclared (first use in this function)
#define BLAS(x) d##x
^
F:\superscs\src\linAlg.c:36:31: note: in expansion of macro 'BLAS'
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^~~~
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
F:\superscs\src\linAlg.c:36:56: error: expected expression before ')' token
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
F:\superscs\src\linAlg.c: In function 'scs_qr_workspace_size':
F:\superscs\src\linAlg.c:119:24: error: 'gels' undeclared (first use in this function)
#define scs_gels_ LPCK(gels)
^
F:\superscs\src\linAlg.c:119:24: note: in definition of macro 'scs_gels_'
#define scs_gels_ LPCK(gels)
^~~~
F:\superscs\src\linAlg.c: In function 'scs_qrls':
F:\superscs\src\linAlg.c:119:24: error: 'gels' undeclared (first use in this function)
#define scs_gels_ LPCK(gels)
^
F:\superscs\src\linAlg.c:119:24: note: in definition of macro 'scs_gels_'
#define scs_gels_ LPCK(gels)
^~~~
F:\superscs\src\linAlg.c: In function 'scs_svd_workspace_size':
F:\superscs\src\linAlg.c:120:26: error: 'gelss' undeclared (first use in this function)
#define scs_dgelss_ LPCK(gelss)
^
F:\superscs\src\linAlg.c:120:26: note: in definition of macro 'scs_dgelss_'
#define scs_dgelss_ LPCK(gelss)
^~~~~
F:\superscs\src\linAlg.c: In function 'scs_svdls':
F:\superscs\src\linAlg.c:120:26: error: 'gelss' undeclared (first use in this function)
#define scs_dgelss_ LPCK(gelss)
^
F:\superscs\src\linAlg.c:120:26: note: in definition of macro 'scs_dgelss_'
#define scs_dgelss_ LPCK(gelss)
^~~~~

@jerrylvx
Copy link

jerrylvx commented Apr 24, 2021

I have encountered the exact same problem. It seems like most of the bugs come form /src/linAlg.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants