FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Building a DLL that uses LibFT4222 and now getting "Unresolved symbol" errors  (Read 26837 times)

allenhuffman

  • Newbie
  • *
  • Posts: 49
  • Mostly harmless.
    • View Profile
    • Sub-Etha Software

I created a DLL for handling our I2C communications protocol. It requires the LibFT4222-64.dll from FTDI. I am using the LabWindows/CVI 2017 compiler.

Everything has been working fine the past few months, but I was requested to make a 32-bit version of the DLL as well. I only changed a few options in the compiler, and now it won't link.

I even made a new project, brought in my source code and the .lib files, and it does the same. I'm not sure what changed.

Do any of these symbols look familiar? Is this something the FTDI DLL is needing? If I don't have it included, it complains about FT_xxx calls. As soon as I add the .libs, then it goes to these:

Build Status (z.prj - Release64)
 Link z.dll
  error: Undefined symbol '??0exception@std@@QEAA@AEBV01@@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??2@YAPEAX_K@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??3@YAXPEAX@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_7type_info@@6B@' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_E?$clone_impl@U?$error_info_injector@Vlock_error@boost@@@exception_detail@boost@@@exception_detail@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_E?$clone_impl@U?$error_info_injector@Vthread_resource_error@boost@@@exception_detail@boost@@@exception_detail@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_E?$error_info_injector@Vlock_error@boost@@@exception_detail@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_E?$error_info_injector@Vthread_resource_error@boost@@@exception_detail@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_ERingQueue@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_ERxBuffer@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_Ebad_alloc@std@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_Eclone_base@exception_detail@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_Elock_error@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_Eruntime_error@std@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_Esystem_error@system@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_Ethread_exception@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '??_Ethread_resource_error@boost@@UEAAPEAXI@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '?generic_category@system@boost@@YAAEBVerror_category@12@XZ' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '?system_category@system@boost@@YAAEBVerror_category@12@XZ' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '?what@exception@std@@UEBAPEBDXZ' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '_CxxThrowException' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__CxxFrameHandler3' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__imp_??0exception@std@@QEAA@AEBQEBD@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__imp_??0exception@std@@QEAA@AEBV01@@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__imp_??1_Container_base12@std@@QEAA@XZ' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__imp_??1exception@std@@UEAA@XZ' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__imp_?_Xlength_error@std@@YAXPEBD@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__imp_?_Xout_of_range@std@@YAXPEBD@Z' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '__imp_?what@exception@std@@UEBAPEBDXZ' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
  error: Undefined symbol '_purecall' referenced in "c:\path\msvc64\LibFT4222-64.lib". 
Build failed.
Logged

allenhuffman

  • Newbie
  • *
  • Posts: 49
  • Mostly harmless.
    • View Profile
    • Sub-Etha Software

Using a DLL dependency walker tool, which I really do not understand how to use, I found some of these unresolved items in:

MSVCR1200.DLL (_purecall, __CppThrowException)

When I used a different walker yesterday, I found them when I clicked on MSVCP100.DLL (VCP versus VCR? I feel like I'm back in the 80s working at the video store.)

In my original project, I never had to do anything except add my sources, tell it to build a DLL, and drag in to .lib files and have the DLL there. I expect something else was making it work - I just have no idea why it stopped working.

Funny enough, I have posted on the LabWindows forum before about MSVCP100.DLL and MSVCR100.DLL. They were required to run out program (using FTDI) and are not part of Windows 10 LTSC. We had to find the MS download that provides them so it could be included with our installer.
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 906
    • View Profile

Hi,

These undefined symbols don't look familiar. The LibFT4222 examples can be build for x86 and x64 which generates a .exe. not a DLL

If the version is lower than or equal to 1.4.4. Libft4222 bases on Microsoft Visual C++ 2010 x86 and x64 Redistributable package.

Please install the below package on the target machine.

https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170


If the version is higher than or equal to 1.4.5. Microsoft Visual C++ 2010 runtime library is built in LibFt4222. The user does not need to install Microsoft Visual C++ 2010 x86 and x64 Redistributable package on the target machine.

Best Regards
FTDI Community
Logged

allenhuffman

  • Newbie
  • *
  • Posts: 49
  • Mostly harmless.
    • View Profile
    • Sub-Etha Software

Dependency Walker shows that LibFT4222(-64).dll has MSVCR100.DLL as a dependency, and I see function matches in that DLL, so I am guessing that is what it is looking for. It finds the DLL, but how does it know the functions exist? I thought a .lib was required, like for the FTDI DLLs. (I am an embedded programmer, with no Windows experience beyond the past four years maintaining an existing product.)
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 906
    • View Profile

Hi,

What version of LibFT4222 are you using?

if you are using an old version of the library, then there are such dependencies. But if you are using the latest version, there should be no dependencies.

Best regards

FTDI Community
Logged

allenhuffman

  • Newbie
  • *
  • Posts: 49
  • Mostly harmless.
    • View Profile
    • Sub-Etha Software

We are using a package numbered 1.4.4 (LibFT4222-v1.4.4.zip), which was the latest the last time I checked.

I will see if there is something newer posted.

Please note -- I was building just fine the past two months, and only when I tried to make a "new" project (creating a 32-bit and 64-bit DLL, instead of just a 64-bit DLL) did I start having these issues. I even made a brand new project, pulling in my .c files and trying to replicate the settings -- same warnings. I expect it's something simple, that was accidentally working in the project I made two months ago.

Logged

allenhuffman

  • Newbie
  • *
  • Posts: 49
  • Mostly harmless.
    • View Profile
    • Sub-Etha Software

I found that there is a 1.4.5 linked here:

https://ftdichip.com/software-examples/ft4222h-software-examples/

I had a hard time finding it this time -- ended up using a search engine. I'm not sure how to get to it directly on the site.
Logged

allenhuffman

  • Newbie
  • *
  • Posts: 49
  • Mostly harmless.
    • View Profile
    • Sub-Etha Software

1.4.5 has taken care of the compiler errors. I still have no idea how I was using 1.4.4 fine for two months before it suddenly "broke" when I tried to make a 32-bit DLL.
Logged