From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-14-2017 09:56 AM
Hi.
I am running CVI 2015 with a simple app that reads data from a spectracom GPS device. Spectracom publish a set of libraries to access the device but when I build the app, I see the following linker errors.
Link GeoMagCalc.exe
error: Undefined symbol '__imp___iob_func' referenced in "c:\Program Files (x86)\Spectracom\TSYNC PCI\Dev64\TPro.lib".
error: Undefined symbol '__imp__snwprintf_s' referenced in "c:\Program Files (x86)\Spectracom\TSYNC PCI\Dev64\TPro.lib".
error: Undefined symbol '__imp_strcat_s' referenced in "c:\Program Files (x86)\Spectracom\TSYNC PCI\Dev64\TPro.lib".
error: Undefined symbol '__imp_wprintf' referenced in "c:\Program Files (x86)\Spectracom\TSYNC PCI\Dev64\TPro.lib".
I guess that these are Windows SDK calls and I need to link to another library. I have done some googling around and this seems to be a common problem in Microsoft Visual C++ 2015 but I have not found a solution.
Can anybody please offer any help.
02-15-2017 03:57 AM
Hi Stephen,
I'm wondering if it is related to this problem i.e. changes in Visual Studio 2015 so the printf and scanf family of functions are defined inline:
There are a number of fix suggestions on that page. Let us know if any of them help you.
Best regards,
Leah
02-15-2017 06:20 AM
Hi Leah
Thanks for the reply. I think that you are correct with regarsds to the changes in VC++ 2015. I understand that CVI uses the CLANG compiler, is this based upon the Microsoft compiler and hence these changes of depricating some of stdlib have come from?
I have also found a copy of legacy_stdio_definitions.lib from VS 2015 and linked against these, but this has created further linker errors as below.
It looks like I still have to find further libs to link to.
Link GeoMagCalc.exe
error: Undefined symbol '__acrt_iob_func' referenced in "c:\svn_mirror\projects\CalSS\GeoMagCalculator\branches\dev1\source\legacy_stdio_definitions.lib".
error: Undefined symbol '__imp___iob_func' referenced in "c:\Program Files (x86)\Spectracom\TSYNC PCI\Dev64\TPro.lib".
error: Undefined symbol '__imp_strcat_s' referenced in "c:\Program Files (x86)\Spectracom\TSYNC PCI\Dev64\TPro.lib".
error: Undefined symbol '__stdio_common_vfprintf' referenced in "c:\svn_mirror\projects\CalSS\GeoMagCalculator\branches\dev1\source\legacy_stdio_definitions.lib".
error: Undefined symbol '__stdio_common_vfprintf_p' referenced in "c:\svn_mirror\projects\CalSS\GeoMagCalculator\branches\dev1\source\legacy_stdio_definitions.lib".
error: Undefined symbol '__stdio_common_vfprintf_s' referenced in "c:\svn_mirror\projects\CalSS\GeoMagCalculator\branches\dev1\source\legacy_stdio_definitions.lib".
error:
02-15-2017 09:16 AM
Hi Stephen,
Awwh no, I hate it when fixing one problem creates 2 more! I'm afraid I don't know much about the CLANG compiler, hopefully someone else here might be able to answer that question.
I take it that you cannot recompile the Spectracom libraries to work in 2015, but perhaps you could get in contact with them and explain the situation?
Also, the Stack Overflow page suggests defining __iob_func() etc. yourself e.g.
extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; }
Would that be an option?
Best regards,
Leah