ilya
-
Posts
2 -
Joined
-
Last visited
Posts posted by ilya
-
-
Hello, I am currently working on a project that requires MATLAB to communicate with Geochemist's Workbench. I found the sample code provided within the documentation and tried compiling it as a MATLAB MEX file only to receive many errors such as:
lcc preprocessor error: pipe.cpp:4 Could not find include file <iostream>
lcc preprocessor error: pipe.cpp:5 Could not find include file <string>
Error pipe.cpp: .\RC_helper.cpp: 26 syntax error; found `stdiopipe' expecting `;'
Error pipe.cpp: .\RC_helper.cpp: 26 syntax error; found `(' expecting `)'
Error pipe.cpp: .\RC_helper.cpp: 26 skipping `(' "unnamedpipe"
Error pipe.cpp: .\RC_helper.cpp: 26 extraneous old-style parameter list
Error pipe.cpp: .\RC_helper.cpp: 26 syntax error; found `)' expecting `;'
Error pipe.cpp: .\RC_helper.cpp: 26 skipping `)'
Error pipe.cpp: .\RC_helper.cpp: 30 syntax error; found `&' expecting `)'
Error pipe.cpp: .\RC_helper.cpp: 30 skipping `&' `pipe'
Error pipe.cpp: .\RC_helper.cpp: 32 undeclared identifier `pipe'
Error pipe.cpp: .\RC_helper.cpp: 32 left operand of . has incompatible type `int'
Error pipe.cpp: .\RC_helper.cpp: 32 type error: pointer expected
Warning pipe.cpp: .\RC_helper.cpp: 32 possible usage of pipe before definition
Error pipe.cpp: .\RC_helper.cpp: 36 redefinition of `Clear' previously defined at .\RC_helper.cpp 30
Error pipe.cpp: .\RC_helper.cpp: 36 redeclaration of `Clear' previously declared at .\RC_helper.cpp 30
Error pipe.cpp: .\RC_helper.cpp: 37 too many arguments to `Clear'
Error pipe.cpp: .\RC_helper.cpp: 38 asm: label _Clear: redefined
Error pipe.cpp: .\RC_helper.cpp: 43 syntax error; found `&' expecting `)'
Error pipe.cpp: .\RC_helper.cpp: 43 skipping `&' `pipe'
Error pipe.cpp: .\RC_helper.cpp: 45 undeclared identifier `DWORD'
Warning pipe.cpp: .\RC_helper.cpp: 45 Statement has no effect
Error pipe.cpp: .\RC_helper.cpp: 45 too many errors
I was wondering if you know if it's something I'm doing wrong or if the provided code itself does not function. If so, who do you suggest I contact to aid in the process of writing a pipe between MATLAB and GWB?
Thank you.
Pipe
in The Geochemist's Workbench
Posted
Thank you for your quick response. The problem is that all of the errors appear to be in the RC_helper.cpp/RC_helper.h (whichever I try) file provided with the program. So it appears that the syntax within the library file that came with the program is incorrect...
Have others used the RC_helper.cpp/RC_helper.h file successfully?
I also tried compiling the unedited RC_example2.cpp and I got:
Error RC_example2.cpp: .\RC_helper.h: 9 syntax error; found `CharArray' expecting `;'
Error RC_example2.cpp: .\RC_helper.h: 9 syntax error; found `{' expecting `;'
Error RC_example2.cpp: .\RC_helper.h: 9 skipping `{'
Error RC_example2.cpp: .\RC_helper.h: 10 syntax error; found `:' expecting `;'
Error RC_example2.cpp: .\RC_helper.h: 10 skipping `:'
Error RC_example2.cpp: .\RC_helper.h: 11 redeclaration of `CharArray' previously declared at .\RC_helper.h 9
Error RC_example2.cpp: .\RC_helper.h: 11 syntax error; found `:' expecting `;'
Error RC_example2.cpp: .\RC_helper.h: 11 skipping `:'
Error RC_example2.cpp: .\RC_helper.h: 11 syntax error; found `1024' expecting `)'
Error RC_example2.cpp: .\RC_helper.h: 11 skipping `1024'
Error RC_example2.cpp: .\RC_helper.h: 12 undeclared identifier `m_buff'
Error RC_example2.cpp: .\RC_helper.h: 12 type error in argument 1 to `malloc'; found `pointer to int function(void)' expected `unsigned int'
Error RC_example2.cpp: .\RC_helper.h: 12 operands of = have illegal types `int' and `pointer to char'
Error RC_example2.cpp: .\RC_helper.h: 13 undeclared identifier `m_size'
Error RC_example2.cpp: .\RC_helper.h: 13 operands of = have illegal types `int' and `pointer to int function(void)'
Error RC_example2.cpp: .\RC_helper.h: 13 type error: pointer expected
Warning RC_example2.cpp: .\RC_helper.h: 14 missing return value
Error RC_example2.cpp: .\RC_helper.h: 15 unrecognized declaration
Error RC_example2.cpp: .\RC_helper.h: 15 undeclared identifier `m_buff'
Error RC_example2.cpp: .\RC_helper.h: 15 type error in argument 1 to `free'; found `int' expected `pointer to void'
Warning RC_example2.cpp: .\RC_helper.h: 15 possible usage of m_buff before definition
Warning RC_example2.cpp: .\RC_helper.h: 15 missing return value
Error RC_example2.cpp: .\RC_helper.h: 16 undeclared identifier `m_size'
Warning RC_example2.cpp: .\RC_helper.h: 16 possible usage of m_size before definition
Error RC_example2.cpp: .\RC_helper.h: 18 too many errors