Problem linking managed/unmanaged .dll using MaxSDK

Problem linking managed/unmanaged .dll using MaxSDK

Anonymous
Not applicable
370 Views
1 Reply
Message 1 of 2

Problem linking managed/unmanaged .dll using MaxSDK

Anonymous
Not applicable
I'm trying to write a helper .dll using a mix of managed and unmanaged c++ code, but am unable to get the .dll to link once I include the <max.h> SDK header. I need to use that to gain access to the unmanaged side of the SDK, but as soon as I include the header I get this error:

error LNK2001: unresolved external symbol "public: virtual short __thiscall FPInterface::FindFn&#40;wchar_t *&#41;" &#40;?FindFn@FPInterface@@UAEFPA_W@Z&#41;

I'm including all the libraries that the plugin wizard adds to the dependency list &#40;which is more than the librareis that the SceneExplorerExtension uses&#41; but for some reason this project will not link but the the SceneExplorerExtension will link. I can't find anything useful in the very sparse .NET SDK or the MaxSDK documentation about what the problem could be.

I'm assuming I'm missing a library I should include, but heck if I can figure out which one. Has anybody seen this problem before or know how to solve it?

Thanks!

Here are the libraries I'm currently linking against:
menus.lib menuman.lib odbc32.lib odbccp32.lib comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib mnmath.lib
0 Likes
371 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Run

for %i in &#40;*.lib&#41; do dumpbin /exports %i | findstr FindFn


It's in core.lib:

?FindFn@FPInterface@@UAEFPAD@Z &#40;public: virtual short __thiscall FPInterface::FindFn&#40;char *&#41;&#41;


Your problem is that you're compiling with _UNICODE. You need to compile with narrow strings. Note the argument to FindFn is char * in the exported function, but you're trying to find a wide version.
0 Likes