-
April 29th, 2013, 05:59 PM
#1
#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?
-
April 30th, 2013, 01:12 AM
#2
Re: #import MSVBVM60.DLL unresolved external...
And what is this Rnd(struct tagVARIANT *)?
Where does it come from?
Victor Nijegorodov
-
April 30th, 2013, 02:27 AM
#3
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...
Last edited by acanel; April 30th, 2013 at 02:31 AM.
-
April 30th, 2013, 05:38 AM
#4
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.
Victor Nijegorodov
-
April 30th, 2013, 11:46 AM
#5
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???
-
April 30th, 2013, 12:18 PM
#6
Re: #import MSVBVM60.DLL unresolved external...
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
-
April 30th, 2013, 05:15 PM
#7
Re: #import MSVBVM60.DLL unresolved external...
i don't know, which library contain this function ...whoever can help me?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|