Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT_DLL.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2B0

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hello,
I am trying to compile the DEMO_DLL project (dynamical load of library) with Visual c++2005.
During linking I will receive the following error message:

ANT_DLL.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2B0

Could you please help me?      
RankRankRank

Total Posts: 95

Joined 2010-05-03

PM

Hi,

I suggest to try building the project using the free version of Microsoft Visual Studio C++ 2008 Express Edition. Here is the link for it:
http://www.microsoft.com/express/Downloads/

and check if the same error still occurs with this express version of visual studio.      
RankRankRank

Total Posts: 95

Joined 2010-05-03

PM

Please also refer to the document below which is about "Dynamic Linking with ANT DLL":

http://www.thisisant.com/images/Resources/PDF/ant_an03 - dynamic linking with ant dll rev 1.3.pdf      
RankRank

Total Posts: 47

Joined 2010-07-08

PM

Another thing that can cause an issue like yours is if you do not set the ANT-FS network key:

#error "MUST TYPE ANT-FS NETWORK KEY HERE, OR SET TO ALL 0'S IF NOT USING ANT-FS"
#define NETWORK_KEY {0x__, 0x__, 0x__, 0x__, 0x__, 0x__, 0x__, 0x__} // INSERT NETWORK KEY HERE !!!!

You must remove the error line and put the ANT-FS key (or some key) there, otherwise this causes the DLLs to not build properly which results in linking errors like you are seeing.