April 16th, 2013, 04:23 AM
#1
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?
Attached Files
Last edited by kw1991; April 16th, 2013 at 04:36 AM .
April 16th, 2013, 04:42 AM
#2
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:
Originally Posted by
kw1991
error LNK2001: unresolved external symbol _Open
or only a short part of it?
Linker Tools Error LNK2001
Victor Nijegorodov
April 16th, 2013, 04:51 AM
#3
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
April 16th, 2013, 04:55 AM
#4
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?)
Last edited by VictorN; June 11th, 2013 at 02:24 AM .
Victor Nijegorodov
April 16th, 2013, 05:00 AM
#5
Re: unresolved external symbol error
ContextExample_s.c was generated when i compiled the idl file. i didn't change any of the code
June 10th, 2013, 06:50 PM
#6
Re: unresolved external symbol error
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.
Tags for this Thread
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