0

I have developed a simple (no COM) C++ DLL for VBA (Excel) in VS 2008, which works perfectly on Win 10 and Excel 2016, as well as on Win XP and Excel 2003, both during debug and release. I have developed it following this example.

Now, jumping to the issue, using the same recipe and piece of code I have developed the same DLL, but in VS 2015. The debug and release versions for x64 work perfectly, but when I want to release the DLL for X86, it throws me the following error:

1>defFile.def : error LNK2001: unresolved external symbol "func_name"

Additional info, the project has only 2 files, as in the example:

  • .cpp
  • .def

Anyone has an idea how to get over this link issue?

My feeling is that, there might be a setting that I overlooked or skipped! If you need the code or the settings, I will happily provide them, but they should be as in the example!

Thanks!

Victor G
  • 1
  • 2
  • I don't work in C++ but a short Google Search on `error lnk2001 unresolved external symbol` got me to [THIS](https://stackoverflow.com/questions/17541283/error-lnk2001-unresolved-external-symbol-c) See if it helps? – Siddharth Rout Jan 08 '19 at 16:41
  • Also a google search on `error lnk2001 unresolved external symbol visual studio 2015` gives you lots of links... – Siddharth Rout Jan 08 '19 at 16:43
  • I assume you created a *VStudio 2015* project and when you're trying to build it it fails. When creating a new project, solution *x86* is selected by default. What surprises me is that you switched to *x64* got it somehow to work and then came back to *x86*. Did you try rebuilding? Do you have a *func\_name* in your c file? Please post the source code for the 2 files. – CristiFati Jan 10 '19 at 12:02

0 Answers0