vensim to matlab
Posted: Mon Jun 27, 2016 1:46 am
Hi All
I am using vensim 6.3D(32-bit) and matlab R2015b(64-bit), would like to call vensim from matlab with the command below:
if not(libisloaded('VenDLL32'))
hfile = ['C:\Users\Public\Vensim\dll\vendll.h'];
loadlibrary('VenDLL32',hfile);
end
and get an error:
Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness.
Warning text can be viewed using:
[notfound,warnings]=loadlibrary(...)
> In loadlibrary
Error loading library intermediate output follows.
The actual error is at the end of this output.
*********
Type 'HWND' was not found. Defaulting to type error.
Found on line 9 of input from line 112 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 15 of input from line 118 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 26 of input from line 129 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 34 of input from line 137 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 40 of input from line 143 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 51 of input from line 154 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
*********
Error using loadlibrary
Building VenDLL32_thunk_pcwin64 failed. Compiler output is:
C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9\\bin\gcc -I"C:\Program Files\MATLAB\Research\R2015b\extern\include"
-fexceptions -fno-omit-frame-pointer -I"C:\Users\S.Mokhtar\Documents\MATLAB" -I"C:\Users\Public\Vensim\dll"
"VenDLL32_thunk_pcwin64.c" -o "VenDLL32_thunk_pcwin64.dll" -shared
In file included from VenDLL32_thunk_pcwin64.c:27:0:
C:\Users\Public\Vensim\dll/vendll.h:112:61: error: unknown type name 'HWND'
CFUNCTION int VEFCC vensim_tool_command(const char *command,HWND pwindow,int aswiptool) ; /* custom.c (not avail
for DLLMIN) */
^
C:\Users\Public\Vensim\dll/vendll.h:118:85: error: unknown type name 'HWND'
CFUNCTION int VEFCC vensim_show_sketch(int sketchnum,int wantscroll,int zoompercent,HWND pwindow) ; /* custom.c
(not avail dllmin) */
^
C:\Users\Public\Vensim\dll/vendll.h:129:46: error: unknown type name 'HWND'
CFUNCTION int VEFCC vensim_set_parent_window(HWND window,long r1,long r2) ;
^
C:\Users\Public\Vensim\dll/vendll.h:137:72: error: unknown type name 'HWND'
CFUNCTION int VEFCC VensimCToolCommand(int context,const char *command,HWND pwindow,int aswiptool) ; /* custom.c
(not avail for DLLMIN) */
^
C:\Users\Public\Vensim\dll/vendll.h:143:96: error: unknown type name 'HWND'
CFUNCTION int VEFCC VensimCShowSketch(int context,int sketchnum,int wantscroll,int zoompercent,HWND pwindow) ; /*
custom.c (int context,not avail dllmin) */
^
C:\Users\Public\Vensim\dll/vendll.h:154:56: error: unknown type name 'HWND'
CFUNCTION int VEFCC VensimCSetParentWindow(int context,HWND window,long r1,long r2) ;
^
VenDLL32_thunk_pcwin64.c: In function 'int32cstringHWNDint32Thunk':
VenDLL32_thunk_pcwin64.c:81:2: error: unknown type name 'HWND'
HWND p1;
^
VenDLL32_thunk_pcwin64.c:85:7: error: 'HWND' undeclared (first use in this function)
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:85:7: note: each undeclared identifier is reported only once for each function it appears
in
VenDLL32_thunk_pcwin64.c:85:12: error: expected ')' before 'const'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:85:20: error: expected ';' before 'callstack'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:89:32: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(char * , HWND , int32_T ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c:89:49: error: expected ')' before 'fcn'
return ((int32_T (*)(char * , HWND , int32_T ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32int32int32HWNDThunk':
VenDLL32_thunk_pcwin64.c:128:2: error: unknown type name 'HWND'
HWND p3;
^
VenDLL32_thunk_pcwin64.c:135:7: error: 'HWND' undeclared (first use in this function)
p3=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:135:12: error: expected ')' before 'const'
p3=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:135:20: error: expected ';' before 'callstack'
p3=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:137:53: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c:137:60: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c: In function 'int32HWNDlonglongThunk':
VenDLL32_thunk_pcwin64.c:200:2: error: unknown type name 'HWND'
HWND p0;
^
VenDLL32_thunk_pcwin64.c:203:7: error: 'HWND' undeclared (first use in this function)
p0=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:203:12: error: expected ')' before 'const'
p0=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:203:20: error: expected ';' before 'callstack'
p0=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:209:23: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(HWND , long , long ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c:209:44: error: expected ')' before 'fcn'
return ((int32_T (*)(HWND , long , long ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32cstringHWNDint32Thunk':
VenDLL32_thunk_pcwin64.c:304:2: error: unknown type name 'HWND'
HWND p2;
^
VenDLL32_thunk_pcwin64.c:310:7: error: 'HWND' undeclared (first use in this function)
p2=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:310:12: error: expected ')' before 'const'
p2=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:310:20: error: expected ';' before 'callstack'
p2=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:314:42: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , char * , HWND , int32_T ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c:314:59: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , char * , HWND , int32_T ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32int32int32int32HWNDThunk':
VenDLL32_thunk_pcwin64.c:369:2: error: unknown type name 'HWND'
HWND p4;
^
VenDLL32_thunk_pcwin64.c:378:7: error: 'HWND' undeclared (first use in this function)
p4=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:378:12: error: expected ')' before 'const'
p4=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:378:20: error: expected ';' before 'callstack'
p4=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:380:63: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3 , p4);
^
VenDLL32_thunk_pcwin64.c:380:70: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3 , p4);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32HWNDlonglongThunk':
VenDLL32_thunk_pcwin64.c:456:2: error: unknown type name 'HWND'
HWND p1;
^
VenDLL32_thunk_pcwin64.c:461:7: error: 'HWND' undeclared (first use in this function)
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:461:12: error: expected ')' before 'const'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:461:20: error: expected ';' before 'callstack'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:467:33: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , HWND , long , long ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c:467:54: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , HWND , long , long ))fcn)(p0 , p1 , p2 , p3);[/b][/i][/i]
could anyone help me with this problem?
I am using vensim 6.3D(32-bit) and matlab R2015b(64-bit), would like to call vensim from matlab with the command below:
if not(libisloaded('VenDLL32'))
hfile = ['C:\Users\Public\Vensim\dll\vendll.h'];
loadlibrary('VenDLL32',hfile);
end
and get an error:
Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness.
Warning text can be viewed using:
[notfound,warnings]=loadlibrary(...)
> In loadlibrary
Error loading library intermediate output follows.
The actual error is at the end of this output.
*********
Type 'HWND' was not found. Defaulting to type error.
Found on line 9 of input from line 112 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 15 of input from line 118 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 26 of input from line 129 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 34 of input from line 137 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 40 of input from line 143 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
Type 'HWND' was not found. Defaulting to type error.
Found on line 51 of input from line 154 of file C:\\Users\\Public\\Vensim\\dll\\vendll.h
*********
Error using loadlibrary
Building VenDLL32_thunk_pcwin64 failed. Compiler output is:
C:\MATLAB\SupportPackages\R2015b\MW_MinGW_4_9\\bin\gcc -I"C:\Program Files\MATLAB\Research\R2015b\extern\include"
-fexceptions -fno-omit-frame-pointer -I"C:\Users\S.Mokhtar\Documents\MATLAB" -I"C:\Users\Public\Vensim\dll"
"VenDLL32_thunk_pcwin64.c" -o "VenDLL32_thunk_pcwin64.dll" -shared
In file included from VenDLL32_thunk_pcwin64.c:27:0:
C:\Users\Public\Vensim\dll/vendll.h:112:61: error: unknown type name 'HWND'
CFUNCTION int VEFCC vensim_tool_command(const char *command,HWND pwindow,int aswiptool) ; /* custom.c (not avail
for DLLMIN) */
^
C:\Users\Public\Vensim\dll/vendll.h:118:85: error: unknown type name 'HWND'
CFUNCTION int VEFCC vensim_show_sketch(int sketchnum,int wantscroll,int zoompercent,HWND pwindow) ; /* custom.c
(not avail dllmin) */
^
C:\Users\Public\Vensim\dll/vendll.h:129:46: error: unknown type name 'HWND'
CFUNCTION int VEFCC vensim_set_parent_window(HWND window,long r1,long r2) ;
^
C:\Users\Public\Vensim\dll/vendll.h:137:72: error: unknown type name 'HWND'
CFUNCTION int VEFCC VensimCToolCommand(int context,const char *command,HWND pwindow,int aswiptool) ; /* custom.c
(not avail for DLLMIN) */
^
C:\Users\Public\Vensim\dll/vendll.h:143:96: error: unknown type name 'HWND'
CFUNCTION int VEFCC VensimCShowSketch(int context,int sketchnum,int wantscroll,int zoompercent,HWND pwindow) ; /*
custom.c (int context,not avail dllmin) */
^
C:\Users\Public\Vensim\dll/vendll.h:154:56: error: unknown type name 'HWND'
CFUNCTION int VEFCC VensimCSetParentWindow(int context,HWND window,long r1,long r2) ;
^
VenDLL32_thunk_pcwin64.c: In function 'int32cstringHWNDint32Thunk':
VenDLL32_thunk_pcwin64.c:81:2: error: unknown type name 'HWND'
HWND p1;
^
VenDLL32_thunk_pcwin64.c:85:7: error: 'HWND' undeclared (first use in this function)
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:85:7: note: each undeclared identifier is reported only once for each function it appears
in
VenDLL32_thunk_pcwin64.c:85:12: error: expected ')' before 'const'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:85:20: error: expected ';' before 'callstack'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:89:32: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(char * , HWND , int32_T ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c:89:49: error: expected ')' before 'fcn'
return ((int32_T (*)(char * , HWND , int32_T ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32int32int32HWNDThunk':
VenDLL32_thunk_pcwin64.c:128:2: error: unknown type name 'HWND'
HWND p3;
^
VenDLL32_thunk_pcwin64.c:135:7: error: 'HWND' undeclared (first use in this function)
p3=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:135:12: error: expected ')' before 'const'
p3=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:135:20: error: expected ';' before 'callstack'
p3=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:137:53: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c:137:60: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c: In function 'int32HWNDlonglongThunk':
VenDLL32_thunk_pcwin64.c:200:2: error: unknown type name 'HWND'
HWND p0;
^
VenDLL32_thunk_pcwin64.c:203:7: error: 'HWND' undeclared (first use in this function)
p0=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:203:12: error: expected ')' before 'const'
p0=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:203:20: error: expected ';' before 'callstack'
p0=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:209:23: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(HWND , long , long ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c:209:44: error: expected ')' before 'fcn'
return ((int32_T (*)(HWND , long , long ))fcn)(p0 , p1 , p2);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32cstringHWNDint32Thunk':
VenDLL32_thunk_pcwin64.c:304:2: error: unknown type name 'HWND'
HWND p2;
^
VenDLL32_thunk_pcwin64.c:310:7: error: 'HWND' undeclared (first use in this function)
p2=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:310:12: error: expected ')' before 'const'
p2=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:310:20: error: expected ';' before 'callstack'
p2=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:314:42: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , char * , HWND , int32_T ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c:314:59: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , char * , HWND , int32_T ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32int32int32int32HWNDThunk':
VenDLL32_thunk_pcwin64.c:369:2: error: unknown type name 'HWND'
HWND p4;
^
VenDLL32_thunk_pcwin64.c:378:7: error: 'HWND' undeclared (first use in this function)
p4=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:378:12: error: expected ')' before 'const'
p4=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:378:20: error: expected ';' before 'callstack'
p4=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:380:63: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3 , p4);
^
VenDLL32_thunk_pcwin64.c:380:70: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , int32_T , int32_T , int32_T , HWND ))fcn)(p0 , p1 , p2 , p3 , p4);
^
VenDLL32_thunk_pcwin64.c: In function 'int32int32HWNDlonglongThunk':
VenDLL32_thunk_pcwin64.c:456:2: error: unknown type name 'HWND'
HWND p1;
^
VenDLL32_thunk_pcwin64.c:461:7: error: 'HWND' undeclared (first use in this function)
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:461:12: error: expected ')' before 'const'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:461:20: error: expected ';' before 'callstack'
p1=*(HWND const *)callstack;
^
VenDLL32_thunk_pcwin64.c:467:33: error: expected declaration specifiers or '...' before 'HWND'
return ((int32_T (*)(int32_T , HWND , long , long ))fcn)(p0 , p1 , p2 , p3);
^
VenDLL32_thunk_pcwin64.c:467:54: error: expected ')' before 'fcn'
return ((int32_T (*)(int32_T , HWND , long , long ))fcn)(p0 , p1 , p2 , p3);[/b][/i][/i]
could anyone help me with this problem?