Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DLL External ref error

DLL External ref error

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiohelpcsharpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeff Patterson
    wrote on last edited by
    #1

    Hi All, I am trying to create a DLL plugin for my favorite non MS IDE and I am getting an "LNK 2019 unresolved external symbol error" when ever it gets to a function call to another file that came with the IDE I am trying to modify. I have included the header file that has the external function declaration in it, in my .c file but it doesn't seem to be working as expected. The code was written in C I am using VS.NET to compile it as C code. Any clues out there? This is my first attempt at writing a DLL. Thanks for the help in advance. Jeff Patterson Programmers speak in Code. http://www.anti-dmca.org[^]

    L J 2 Replies Last reply
    0
    • J Jeff Patterson

      Hi All, I am trying to create a DLL plugin for my favorite non MS IDE and I am getting an "LNK 2019 unresolved external symbol error" when ever it gets to a function call to another file that came with the IDE I am trying to modify. I have included the header file that has the external function declaration in it, in my .c file but it doesn't seem to be working as expected. The code was written in C I am using VS.NET to compile it as C code. Any clues out there? This is my first attempt at writing a DLL. Thanks for the help in advance. Jeff Patterson Programmers speak in Code. http://www.anti-dmca.org[^]

      L Offline
      L Offline
      Le centriste
      wrote on last edited by
      #2

      Usually, you must link to the .lib file that goes with the .h file, unless all functions and methods are inline. Check the documentation.

      J 1 Reply Last reply
      0
      • L Le centriste

        Usually, you must link to the .lib file that goes with the .h file, unless all functions and methods are inline. Check the documentation.

        J Offline
        J Offline
        Jeff Patterson
        wrote on last edited by
        #3

        Thanks for the response. Unfortunately the documentation is virtually non existant. I have been trying to get this to work for the last three days. There is only one .lib file and I am linking to that and two .h files in different default directories that I have to include. I am kind of at a loss. I have spent most of today playing with the compile and link settings. Jeff Patterson Programmers speak in Code. http://www.anti-dmca.org[^]

        1 Reply Last reply
        0
        • J Jeff Patterson

          Hi All, I am trying to create a DLL plugin for my favorite non MS IDE and I am getting an "LNK 2019 unresolved external symbol error" when ever it gets to a function call to another file that came with the IDE I am trying to modify. I have included the header file that has the external function declaration in it, in my .c file but it doesn't seem to be working as expected. The code was written in C I am using VS.NET to compile it as C code. Any clues out there? This is my first attempt at writing a DLL. Thanks for the help in advance. Jeff Patterson Programmers speak in Code. http://www.anti-dmca.org[^]

          J Offline
          J Offline
          John R Shaw
          wrote on last edited by
          #4

          I am afraid Michel Prévost is right. You need the right .lib. But I have some questions you need to ask you self. (1) If you are writing add-in using C++ (you did not say), then are you are you making sure you are using C linkage (non-mangled names). Example: When using Visual C/C++ or Visual C++ you need to use #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif ether in the header file or surrounding the include C header file. (2) Does the library you are attempting to use have the same name as the .dll, If not it is the wrong library and you have a major problem. (3) If you do not have the right library is there any way that a library can be created from the existing .dll file? Well I do not know for sure, but I may have seen an aticle on doing that on this site or some where else. (4) If all else fails contact the company or developers of the IDE you wish to add-in to. On second thought may be you should have tryed this first. Well I have no solution but I hope the above will give you some direction. Trust in the code Luke. Yea right!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups