unresolved external symbol error
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: unresolved external symbol error

  1. #1
    Join Date
    Mar 2013
    Posts
    30

    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 Attached Files
    Last edited by kw1991; April 16th, 2013 at 04:36 AM.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,359

    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
    Victor Nijegorodov

  3. #3
    Join Date
    Mar 2013
    Posts
    30

    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

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,359

    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

  5. #5
    Join Date
    Mar 2013
    Posts
    30

    Re: unresolved external symbol error

    ContextExample_s.c was generated when i compiled the idl file. i didn't change any of the code

  6. #6
    Join Date
    Mar 2009
    Posts
    1

    Re: unresolved external symbol error

    Quote Originally Posted by kw1991 View Post
    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center