#import MSVBVM60.DLL unresolved external...
I have this code!.
#include "stdafx.h"
#include <stdlib.h>
#include "windows.h"
#import "MSVBVM60.DLL" raw_interfaces_only no_implementation named_guids rename_namespace ("vb6") rename ("EOF", "vbEOF") rename ("RGB", "vbRGB") rename ("GetObject", "vbGetObject")
using namespace vb6;
int _tmain(int argc, _TCHAR* argv[])
{
VARIANT v565;
v565.intVal=2;
float v533;
*(float *)&v533 = Rnd(&v565);
return 0;
}
When build, with vs2012.. obtain this error..
"
Error 1 error LNK2019: unresolved external symbol "float __stdcall vb6::Rnd(struct tagVARIANT *)" (?Rnd@vb6@@YGMPAUtagVARIANT@@@Z) referenced in function _wmain
Error 2 error LNK1120: 1 unresolved externals
"
what is wrong?
library or statement which I do?
Re: #import MSVBVM60.DLL unresolved external...
And what is this Rnd(struct tagVARIANT *)?
Where does it come from?
Re: #import MSVBVM60.DLL unresolved external...
This dll (MSVBVM60.DLL) uses several functions RND one is which I want to use in my c + + program...
MSVBVM60.DLL is visual basic runtime library...
Re: #import MSVBVM60.DLL unresolved external...
It looks like this function is NOT exported from the library. At least the
Code:
>dumpbin /EXPORTS C:\WINDOWS\system32\MSVBVM60.DLL
doesnt show this function.
Re: #import MSVBVM60.DLL unresolved external...
Thx.
When i use visual studio 2012 and use this instruction: (sorry my english is so bad....)
#import "MSVBVM60.DLL" raw_interfaces_only no_implementation named_guids rename_namespace ("vb6") rename ("EOF", "vbEOF") rename ("RGB", "vbRGB") rename ("GetObject", "vbGetObject")
Generate this file "MSVBVM60.tlh" into this file, this code.
VARIANT * Number );
float __stdcall Rnd(
VARIANT * Number );
How vstudio generate this code? if this function not here???
Re: #import MSVBVM60.DLL unresolved external...
Quote:
Originally Posted by
acanel
VARIANT * Number );
float __stdcall Rnd(
VARIANT * Number );
How vstudio generate this code? if this function not here???
The error you're getting is a linker error, not a compiler error.
All that line that you posted does is make the compiler happy. It doesn't do anything for the linker. The linker must be given the library file where that function exists.
Regards,
Paul McKenzie
Re: #import MSVBVM60.DLL unresolved external...
i don't know, which library contain this function ...whoever can help me?