Re: So stuffed up
"Jack" <jl@knight.com> ha scritto nel messaggio
news:ePP17C7yIHA.1768@TK2MSFTNGP03.phx.gbl...
No use, I have tried using _UNICODE and change the startup stub.
CoreExport virtual char* GetRsrcString(long id) { return ""; }
--------------------Configuration: try1 - Win32 Debug--------------------
Compiling...
try1.cpp
DllEntry.cpp
Linking...
Creating library Debug/try1.lib and object Debug/try1.exp
try1.obj : error LNK2001: unresolved external symbol "public: virtual char
* __thiscall ClassDesc::GetRsrcString(long)"
(?GetRsrcString@ClassDesc@@UAEPADJ@Z)
D:\3dsmax7\plugins\try1.dle : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
/////////////////////////////
CoreExport virtual char* GetRsrcString(long id) { return ""; } // Added by
Jacky
Sorry, but I did not mean that.
If you want to use Unicode aware code, you should use TCHAR.
My suggesion was - considering the error message complaing about char* - to
use explicit char*, and not TCHAR (I had an hypothesis about mismatch of
char*/wchar_t*).
If you *coherently* use TCHARs, continue doing so.
Another suggestion was to put the method implementation *outside* header
file:
// In header .h file:
CoreExport virtual TCHAR * GetRsrcString(long id);
// In .cpp file
TCHAR * ClassDesc::GetRsrcString( long id )
{
return _T("Something...");
}
BTW: Do you properly use preprocessor macros for
__declspec(dllimport/export) ?
// --- In header file:
#ifndef CoreExport
#define CoreExport __declspec( dllimport )
#endif
// --- in .cpp file:
// Define before #including header
#define CoreExport __declspec( dllexport )
#include "ClassDesc.h" // Header file
....
And I did not know that you are trying to mix VC7 and VC6 libraries... (I
learned that from Uli's post).
It is impossible to do that (you can do such a binary mix only if you use
COM, which I think is not your case).
As Uli's suggested, you need to build *everything* with the same compiler.
Giovanni