Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Compile issues related to External material model

Please login with a confirmed email address before reporting spam

Dear all:

I programed an external material model in which the utility functions provided by COMSOL are used. However, I encoutered some issues related to these utility functions when I was trying to compile the code. Could you please give me some ideas to solve these issues? Thanks for your help.

The error messages are as follows:

Code 1 line 155: int csext_from_voigt(double sTrial[6], int 1, double sTmatrix[3][3]);

Errors: EFM_new.c(155): error C2143: syntax error: missing ')' before 'constant' EFM_new.c(155): warning C4030: first formal parameter list longer than the second list EFM_new.c(155): error C2143: syntax error: missing ';' before 'constant' EFM_new.c(155): error C2059: syntax error: 'type' EFM_new.c(155): error C2059: syntax error: ')'

Code 2 int csext_eig(double sTmatrix[3][3], double vals[3], double vecs[3][3]);

Errors: EFM_new.c(175): error C2065: 'vecs': undeclared identifier EFM_new.c(175): error C2109: subscript requires array or pointer type

CODE 3 int csext_inv(double C[3][3], double 1e-5, double C_in[3][3]);

Errors: EFM_new.c(332): error C2143: syntax error: missing ')' before 'constant' EFM_new.c(332): warning C4030: first formal parameter list longer than the second list EFM_new.c(332): error C2143: syntax error: missing ';' before 'constant' EFM_new.c(332): error C2059: syntax error: 'type' EFM_new.c(332): error C2059: syntax error: ')'

-------------------
Yu Zhang

1 Reply Last Post 9 dic 2019, 02:18 GMT-5
Mats Danielsson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 9 dic 2019, 02:18 GMT-5
Updated: 5 years ago 9 dic 2019, 02:18 GMT-5

Hello!

From what it seems, the compilation errors occur in EFM_new.c. However, it is difficult to examine the exact source of the problem unless we see your source code, etc. Please contact COMSOL Support, and we will take it from there.

Mats

Hello! From what it seems, the compilation errors occur in EFM_new.c. However, it is difficult to examine the exact source of the problem unless we see your source code, etc. Please contact COMSOL Support, and we will take it from there. Mats

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.