Hi!
I have stepped a few step back now. I create one "Dynamic Link Library" and one "Console application" project using the GNU C++ compiler.
I build the auto generated setup in the "Dynamic Link Library"-project with the one change that I rename the "main.h" to "main_dll.h". I now have exported a function called "SomeFunction". I can access this function from Matlab.
How do I access this from my "Console application"-project in Code::Blocks???
(Is there any documentation about how to set this up?)
I have no idéa about where to start. I have of course included the main_dll.h in my console application I does compile, bot from Linker I get "undefined reference to `_imp__SomeFunction". I guess I need to take more actions, any tip about what (or even better, where can I read about it?)
This is my "Console application":
#include <iostream>
#include "main_dll.h"
using namespace std;
int main()
{
cout << "Hello world!" << endl;
SomeFunction("Andreas hej!");
return 0;
}