
Originally Posted by
marcel
OK, nice, but you should really have mentioned what exactly you need to preprocess

.
I initially thought you had some code+macro constructs that you needed to be expanded to something by a 3rd party preprocessor.
Yes, sorry about that... I didn't want to confuse the issue before the specific problem was solved. Here's what I can do now (and I'll release this software sometime soon). ~~ very exciting ~~
//I include this single header /////////////////////
//and link to chainlink_engine library ///////////
#include "chainlink_engine.h"
int main(int argc, char *argv[]) {
%in this block I execute arbitrary chainlink (Matlab) commands!
X=1:1000;
Y=sqrt(1:1000);
H=plot(X,Y);
setWindowTitle(H,str1); %I can even use variables passed in from C++
str1=str1+' hello world'; %and even modify these!
}
cout << str1; //and see the result in C++
//now we are getting somewhere :)
return 0;
}
//I include this single header /////////////////////
//and link to chainlink_engine library ///////////
#include "chainlink_engine.h"
int main(int argc, char *argv[]) {
QString str1=argv[1];
CHAINLINK(QString str1) {
%in this block I execute arbitrary chainlink (Matlab) commands!
X=1:1000;
Y=sqrt(1:1000);
H=plot(X,Y);
setWindowTitle(H,str1); %I can even use variables passed in from C++
str1=str1+' hello world'; %and even modify these!
}
cout << str1; //and see the result in C++
//now we are getting somewhere :)
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks