I'm trying to build an application in Windows using QtCreator and the external Matlab libraries. I can add the libraries and include directories, but when it tries to link, I get "unresolved external symbol" for all the Matlab functions. QtCreator is looking for _matOpen, but the function is matOpen. I used "dumpbin" to look at the symbols, and sure enough the symbol in the qt obj file is
...
00000294 REL32 00000000 149 _matOpen
...
149 00000000 UNDEF notype () External | _matOpen
...
and in the matlab library:
...
77B8 __imp_matOpen
77B8 matOpen
...
4B matOpen
...
Version : 0
Machine : 8664 (x64)
TimeDateStamp: 5009E1D3 Fri Jul 20 15:55:15 2012
SizeOfData : 00000013
DLL name : libmat.dll
Symbol name : matOpen
Type : code
Name type : name
Hint : 97
Name : matOpen
Why is QtCreator adding the underscore, and how do I get it to stop?
I'm using Matlab 2012b, Qt 5.4, and QtCreator 3.3.2.