News:

  • February 01, 2023, 10:39:55 AM

Login with username, password and session length

Author Topic: Compiling the .dll in visual studio 10  (Read 6109 times)

jaRobert

  • Newbie
  • *
  • Posts: 3
Compiling the .dll in visual studio 10
« on: September 24, 2012, 07:19:05 PM »
I am trying to decipher the inner workings of the hei.c file for specific functions so I can port them to an embedded Linux device.  I am trying to compile the c files to form a .dll in visual studio 10, but am having unresolved external symbol problems with one of the object files.  I'm much more of a hardware guy than software, so I am out of my element, and don't even know if I can compile these files.  I tried to muck with the files as little as possible when trying to resolve errors, since they should just work, but I really have no idea what to do if object files are not linking properly.  This may be more of a visual studio question, but no one knows what can and cannot be done with the code better then you guys.  So, should it be possible to get the .c files to compile into a .dll, and if so, is there something I need to resolve to get it to work properly?  Thanks.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3463
    • Host Engineering
Re: Compiling the .dll in visual studio 10
« Reply #1 on: September 24, 2012, 08:12:57 PM »
Post the output window output of VS10.  That will show us exactly what the unresolves are, along with who is trying to access what.

jaRobert

  • Newbie
  • *
  • Posts: 3
Re: Compiling the .dll in visual studio 10
« Reply #2 on: September 25, 2012, 07:50:57 AM »
Thanks for taking a look.  I have named the project heidll.dll, and have added the three .h files to the project, and am trying to compile the three .c files together.  The intrface.c file definetly includes the hei.h header, despite the linking errors.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3463
    • Host Engineering
Re: Compiling the .dll in visual studio 10
« Reply #3 on: September 25, 2012, 08:03:30 AM »
Yes, you are missing the WinSock library.  In your Project settings, under Linker, Input, add Ws2_32.lib.  It should be in your default lib path for VS2010.  Make sure you add it for both the Release and Debug settings.  BTW, all that detail was towards the bottom of the Help topic for WSAGetLastError (actually, I hate MSDN, I google everything and google can find what I need better than MSDN, sadly).

WinSock is just Window's version of Berkley sockets.  Their calls should correspond to Berkley sockets once you start the port.

I thought at one time Host had a posting of the SDK developed for Linux.  Somebody ported it and we helped them out, so they let us post their implementation.  I can find out about that if you are interested.