1 Attachment(s)
unresolved external symbol error
I have tried following this tutorial to create an RPC server and client:
http://www.codeproject.com/Articles/...-to-RPC-Part-2
but i got this error:
error LNK2001: unresolved external symbol _Open
i'm not missing any files so i really don't know where the problem is
i attached the project so could someone please check them out and see why its causing this error?
Re: unresolved external symbol error
There is a Comments and Discussions section in the bottom of the article. Did you try to ask there?
Did you show us the complete error message:
Quote:
Originally Posted by kw1991
error LNK2001: unresolved external symbol _Open
or only a short part of it?
Linker Tools Error LNK2001
Re: unresolved external symbol error
no i did not ask in the comments and discussions section. i thought this was the right section to post questions?
full error:
error LNK2001: unresolved external symbol _Open ContextExample_s.obj rpcServer
fatal error LNK1120: 1 unresolved externals C:\rpcServer\Debug\rpcServer.exe rpcServer
Re: unresolved external symbol error
Is the file ContextExample_s.cpp (or ContextExample_s.c) your own file? Or maybe you changed some code in this file (or in some of the header files this file includes?)
Re: unresolved external symbol error
ContextExample_s.c was generated when i compiled the idl file. i didn't change any of the code
Re: unresolved external symbol error
Quote:
Originally Posted by
kw1991
ContextExample_s.c was generated when i compiled the idl file. i didn't change any of the code
Maybe you figured it out already, but hopefully this'll help anyone coming across the same issue as I did when following some RPC tutorials.
When you run the MIDL compiler, use the '/char ascii7' parameter.
ie.
midl /char ascii7 /app_config /no_cpp ContextExample.idl
Not sure why this fixed it, but I've been pulling my hair out for a while with this. Hope it helps.