1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with integrating lib in visual studio

Discussion in 'C#' started by vraghuind, May 13, 2013.

  1. #1
    Hello,
    If You get it working I will pay... I need a very basic project in visual studio with libvncserver (latest version). Using the sample code on the website, I try to build but it fails...

    nt main(int argc,char** argv) { int width = GetSystemMetrics(SM_CXVIRTUALSCREEN); int weight = GetSystemMetrics(SM_CYVIRTUALSCREEN); int bpp = 3; rfbScreenInfoPtr screen = rfbGetScreen(&argc, argv, width, weight, 8, 3, bpp); screen->frameBuffer =static_cast<char *>(malloc(width*weight*bpp)); rfbInitServer(screen); return(0); }
    Then when I build I get these errors:
    1>main.obj : error LNK2019: unresolved external symbol _rfbInitServerWithoutPthreadsAndZRLE referenced in function _main
    1>main.obj : error LNK2019: unresolved external symbol _rfbGetScreen referenced in function _main
     
    Solved! View solution.
    vraghuind, May 13, 2013 IP
  2. #2
    the errors are telling you the functions have changed. You are probably using an old example for an updated library, or you haven't linked the library's correctly, an easy way is to check the prototypes and compare the two functions "_rfbInitServerWithoutPthreadsAndZRLE" and "_rfbGetScreen"
     
    wren11, May 13, 2013 IP
  3. vraghuind

    vraghuind Member

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    Thank you :)
     
    vraghuind, May 15, 2013 IP
  4. annaharris

    annaharris Active Member

    Messages:
    119
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    51
    #4
    Wren11 is right, you may be using an old example for the library or you may not have linked the library correctly.
     
    annaharris, Jun 4, 2013 IP