Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Further DLL issues.

Rank

Total Posts: 19

Joined 2013-04-03

PM

I am having some further issues with using the ANT DLL in a standalone executable. I developed an application using Qt 4.7. Initially I could not get the ANT DLL to load. I tried installing the MS VC++ 2008 redistributable package but that did not help. I finally ended up installing a demo version of MS VC++ and that worked.

I now have my application as a standalone executable and I am trying it on different machines. It works fine on my development machine and another machine that had MS VC++ installed. However when I try it on machines that do not have MS VC++ installed, the application crashes when it tries to load the DLL. As an experiment I tried installing the demo version of MS VC++ on one of the machines that had the program crash and after that the executable worked fine.

I know there is something I am overlooking. On a computer on which the application does not work I verified that it had Microsoft.NET version > 3.5 (and sp1 installed). It also has MS VC++ 2008 redistributable installed. I checked if ANTWareII worked on the machine, and it does. ANTWare recognizes the ANT dongle and communicates with it fine.

In my application directory I am including the ANT DLLs. One of the readme files states that
"The ANT_NET.dll needs to be included as a reference, while the ANT_WrappedLib.dll, along with
the Silabs Dynamic Libraries, just needs to be present in the working directory of your
application." I am not sure what "ANT_NET.dll needs to be included as a reference" means since I have not done that in the instances in which the standalone works.

We are demonstrating the application to other people and asking them to install MS VC++ demo program is not practical. Any thoughts on what I am missing?

Thanks.
     
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

Re "I am not sure what "ANT_NET.dll needs to be included as a reference" means":
This refers to Visual Studio projects in one of the CLR languages (C#, VB, ...). It means that you must add ANT_NET.dll to the "References" of the project, i.e. to CLR (vulgo "managed") DLLs that can be used by classes of the project. Much like an "external" declaration in C or similar languages.
     
Avatar
Rank

Total Posts: 12

Joined 0

PM

Are you working with a debug build version of the DLL or a release version? If you have a debug version then it is logical that you are missing some <lib_name>d.dll files. Check it otherwise with a dependency walker or depend tool. But probably you can see this information also in visual studio.

Otherwise you can rebuild the complete library yourself in release mode. Think also about the ANT_DLL.dll (C++).

Are you using the files from \ANT_Windows_Library_Package_v3.0\BIN\ ?

Best regards,
Antoine      
Rank

Total Posts: 19

Joined 2013-04-03

PM

aheijde - 18 June 2013 04:29 AM
Are you working with a debug build version of the DLL or a release version? If you have a debug version then it is logical that you are missing some <lib_name>d.dll files. Check it otherwise with a dependency walker or depend tool. But probably you can see this information also in visual studio.

Otherwise you can rebuild the complete library yourself in release mode. Think also about the ANT_DLL.dll (C++).

Are you using the files from \ANT_Windows_Library_Package_v3.0\BIN\ ?

Best regards,
Antoine


Unfortunately we have had multiple copies of the ANT files and since there did not appear to be a difference in terms of names or size, I did not grab the ANT dlls from a specific directory. When I originally had a problem loading the ANT_DLL.dll file on my development machine I ran Dependency Walker and found that I was missing two dlls: msvcr100d.dll and msvcp100d.dll. That's when I Installed the demo version of MS VC++ to deal with this. I knew at the time that the "d" suffix stood for debug but did not think that was related using a debug version of ANT dlls.      
Avatar
Rank

Total Posts: 12

Joined 0

PM

Just for info: If you put those files along the ANT dll files it will also work. Of course use this approach only for prototyping or a quick demo not as a release wink      
Rank

Total Posts: 19

Joined 2013-04-03

PM

It appears that using the DLLs from the release directory was the trick I was missing. I must have grabbed them from a different location a while ago and never thought that there would be a difference. Thanks to everyone for their comments and pointing me in the right direction.