Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Simulation Tools → Thread

   

Building ANT+ Simulator problem

Rank

Total Posts: 5

Joined 2014-08-25

PM

Hello,

I am trying to build DisplaySimulator and SensorSimulator using VS2010 Express SP1.
Building process is passed ( with some warning ) but when i try to start builded apps both crashes.
I have installed pre-builded Simulation Tools and they are running fine , just my build crash.
( when i have opened the project VS opened project conversion window maybe there is some mess during the conversion ? )

Below you can find build log from the project ( thank you for help in advance ).

--- cut ---
1>------ Build started: Project: ANT+DisplaySimulator, Configuration: Release Win32 ------
2>------ Build started: Project: ANT+SensorSimulator, Configuration: Release Win32 ------
1> stdafx.cpp
2> stdafx.cpp
1> ant_dll.cpp
2> ant_dll.cpp
2> ANTChannel.cpp
1> ANTChannel.cpp
1>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
2>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
1> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
2> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
1> ANTClass.cpp
2> ANTClass.cpp
2> AssemblyInfo.cpp
1> AssemblyInfo.cpp
1> BikeCadenceDisplay.cpp
2> BikeCadenceSensor.cpp
1> BikePowerDisplay.cpp
2> BikePowerSensor.cpp
1>devices\BikePowerDisplay.cpp(130): warning C4101: 'errorCommon' : unreferenced local variable
1> BikeSpdCadDisplay.cpp
2>devices\BikePowerSensor.cpp(289): warning C4101: 'errorMain' : unreferenced local variable
2>devices\BikePowerSensor.cpp(305): warning C4101: 'errorCommon' : unreferenced local variable
2> BikeSpdCadSensor.cpp
1> BikeSpeedDisplay.cpp
2> BikeSpeedSensor.cpp
1> CustomDisplay.cpp
2> CustomSensor.cpp
1> GeocacheDisplay.cpp
2> GeocacheSensor.cpp
2> HRMSensor.cpp
1> HRMDisplay.cpp
1> LEVDisplay.cpp
2> LEVSensor.cpp
2> MainForm.cpp
1> MainForm.cpp
1>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
1> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
2>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
2> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
2> MSMSensor.cpp
1> MSMDisplay.cpp
1> RacquetDisplay.cpp
2> RacquetSensor.cpp
2> SDMSensor.cpp
1> SDMDisplay.cpp
1>devices\SDMDisplay.cpp(185): warning C4101: 'errorCommon' : unreferenced local variable
2>devices\SDMSensor.cpp(265): warning C4101: 'errorCommon' : unreferenced local variable
2> SimMain.cpp
1> SimMain.cpp
1>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
1> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
2>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
2> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
2> TemperatureSensor.cpp
1> TemperatureDisplay.cpp
1>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
1> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
2>c:\projects\antplus_simulator_src\devices\antplus_temperature.h(240): warning C4309: 'initializing' : truncation of constant value
2> This diagnostic occurred in the compiler generated function 'void Temperature::Temperature(void)'
1> WeightScaleDisplay.cpp
2> WeightScaleSensor.cpp
1>devices\WeightScaleDisplay.cpp(106): warning C4101: 'errorWeightScale' : unreferenced local variable
1>devices\WeightScaleDisplay.cpp(117): warning C4101: 'errorCommon' : unreferenced local variable
1>devices\WeightScaleDisplay.cpp(149): warning C4101: 'errorWeightScale' : unreferenced local variable
2>devices\WeightScaleSensor.cpp(141): warning C4101: 'errorWeightScale' : unreferenced local variable
2>devices\WeightScaleSensor.cpp(151): warning C4101: 'errorCommon' : unreferenced local variable
2>devices\WeightScaleSensor.cpp(181): warning C4101: 'errorWeightScale' : unreferenced local variable
2> Generating Code...
1> Generating Code...
2> .NETFramework,Version=v4.0.AssemblyAttributes.cpp
1> .NETFramework,Version=v4.0.AssemblyAttributes.cpp
2> LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
1> LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
2> ANT+SensorSimulator.vcxproj -> C:\Projects\antplus_simulator_src\Release\ANT+SensorSimulator.exe
1> ANT+DisplaySimulator.vcxproj -> C:\Projects\antplus_simulator_src\Release\ANT+DisplaySimulator.exe
2> C:\Projects\antplus_simulator_src\\common\ANT_DLL.dll
2> C:\Projects\antplus_simulator_src\\common\DSI_CP210xManufacturing_3_1.dll
2> C:\Projects\antplus_simulator_src\\common\DSI_SiUSBXp_3_1.dll
1> C:\Projects\antplus_simulator_src\\common\ANT_DLL.dll
1> C:\Projects\antplus_simulator_src\\common\DSI_CP210xManufacturing_3_1.dll
2> Liczba skopiowanych plików: 3.
1> C:\Projects\antplus_simulator_src\\common\DSI_SiUSBXp_3_1.dll
1> Liczba skopiowanych plików: 3.
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
--- cut --      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Hi,

Could you try Visual Studio 2008 Express?      
Rank

Total Posts: 5

Joined 2014-08-25

PM

Unfortunetly no :( i need to stick to VS2010. Well i can try 2012 but i think it will only get worse ...      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

The ANT+ Simulators are a relatively old software tool and were not upgraded for development with Visual Studio 2010+.

Were you hoping to use them as reference code for a specific ANT+ PC application?



     
Rank

Total Posts: 5

Joined 2014-08-25

PM

I wanted to see how connecting the device and then downloading the data real time works ( if you can point me to some documentation where i can found those things that would be fine too ).      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

The ANT+ Device Profile documents contain the required information to pair, receive and decode data from ANT+ devices. They can be found under the documents tab on the downloads page.

For PC app development, I would recommend getting started with the ANT Windows Library package: http://www.thisisant.com/resources/ant-windows-library-package-with-source-code/

Recommended Reading:

Starting an ANT Project:
http://www.thisisant.com/developer/ant/starting-your-project/

Implementing an ANT+ Device Profile:
http://www.thisisant.com/developer/ant-plus/developer/      
Rank

Total Posts: 5

Joined 2014-08-25

PM

Thank you for your help.

Btw. Changing to VS2008 solved the building problem , now both apps are running.      
Rank

Total Posts: 5

Joined 2014-08-25

PM

I do not want to start another topic so i will write it here.
I added ANT_LIB ( builded by vs2008 ) to my project and now i am getting linker errors :

-- cut --

1>ANT_LIB.lib(usb_device_handle_si.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>ANT_LIB.lib(dsi_serial_generic.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<class USBDevice const * *> >::~_Container_base_aux_alloc_empty<class std::allocator<class USBDevice const * *> >(void)" (??1?$_Container_base_aux_alloc_empty@V?$allocator@PAPBVUSBDevice@@@std@@@std@@IAE@XZ)
1>ANT_LIB.lib(usb_device_handle_win.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>ANT_LIB.lib(usb_device_handle_libusb.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>ANT_LIB.lib(usb_device_handle_si.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>ANT_LIB.lib(usb_device_handle_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) referenced in function "protected: static void __cdecl std::vector<class USBDevice const * *,class std::allocator<class USBDevice const * *> >::_Xlen(void)" (?_Xlen@?$vector@PAPBVUSBDevice@@V?$allocator@PAPBVUSBDevice@@@std@@@std@@KAXXZ)
1>ANT_LIB.lib(usb_device_handle_libusb.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)
1>ANT_LIB.lib(usb_device_handle_si.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)
1>ANT_LIB.lib(usb_device_handle_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) referenced in function "protected: static void __cdecl std::vector<class USBDevice const * *,class std::allocator<class USBDevice const * *> >::_Xlen(void)" (?_Xlen@?$vector@PAPBVUSBDevice@@V?$allocator@PAPBVUSBDevice@@@std@@@std@@KAXXZ)
1>ANT_LIB.lib(usb_device_handle_libusb.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)
1>ANT_LIB.lib(usb_device_handle_si.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)
1>ANT_LIB.lib(usb_device_handle_win.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::log