I’m having some issues when I try to compile a DLL in Matlab 2019b. I use the Library Compiler to create a DLL of a Matlab function, and then I create a wrapper and DLL using the mbuild command. I have recently been using Matlab 2014a, and I can use the following line without issue to create the DLL and wrappercode:
mbuild -v -g wtest.c test.lib LINKFLAGS="$LINKFLAGS /DLL " LDEXT=".dll" CMDLINE250="mt -outputresource:$EXE';'2 -manifest $MANIFEST";
However, if I use the same code in Matlab 2019b (I have compiled the Matlab function with the 2019b Library Compiler), I get the following error:
Error using mbuild (line 166)
Unable to complete successfully.
undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
In Matlab 2014a the DLL is built using 'Microsoft Windows SDK 7.1', while the Matlab 2019b uses 'MinGW64 Compiler'.
I’ve had some troubles installing MinGW64 extension as I have Matlab on an offline computer, and I suspect this could be some of the issue. I've tried to reinstall it and still have the same issue.
Do you have any advice?