Author Topic: Configuring the Matlab project wizard - DLLTOOL?  (Read 6146 times)

zetterdog

  • Guest
Configuring the Matlab project wizard - DLLTOOL?
« on: December 13, 2011, 12:55:12 pm »
Hi,

I'm new to C::B and was hoping someone could help me to configure the Matlab project wizard. It says:

"For GCC you must have converted the Matlab DLL's into GCC compatible libraries using the DLLTOOL before. This wizard expects the GCC libraries at the location: [MATLAB]/extern/lib/win32/gcc"

How do I do this? I have dlltool.exe in C:\MinGW\bin, but I don't know how to use it...

Thanks in advance for any help!

PS. I'm using C::B 10.05 & Matlab R2011a 64-bit, on Win7 64-bit.

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Configuring the Matlab project wizard - DLLTOOL?
« Reply #1 on: December 13, 2011, 02:25:50 pm »
Because your matlab is 64bit, you should use 64bit compiler such as MinGW64 64bit gcc.
Then you can use
dlltool --dllname a.dll --def a.def --output-lib liba.a

and you can use pexport or gendef to generate a.def
Regards,
xunxun

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Configuring the Matlab project wizard - DLLTOOL?
« Reply #2 on: December 13, 2011, 04:56:03 pm »
"For GCC you must have converted the Matlab DLL's into GCC compatible libraries using the DLLTOOL before. This wizard expects the GCC libraries at the location: [MATLAB]/extern/lib/win32/gcc"
Notice that for recent GCC's you might not even need this anymore. You can link directly tot he libraries provided for e.g. MSVC. However, probably you'll need to adjust the wizard so it looks for the right library files then.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ