_imp__wassert linker errors with static lib

Everything else that doesn't fall into one of the other PB categories.
epidemicz
User
User
Posts: 86
Joined: Thu Jan 22, 2009 8:05 am
Location: USA
Contact:

_imp__wassert linker errors with static lib

Post by epidemicz »

Hi folks,

I was wondering if I anyone could shed some light this linker error im getting with this library I'm trying to use.

Library: http://www.zezula.net/download/stormlib.zip (the project is StormLib.sln)

Also, I'm using VS2010.

Just trying to use one function out of it for now for testing.. my code:

Code: Select all

Import "StormLibDAD.lib"
  SFileOpenArchive(a.l,b.l,c.l,d.l) As "?SFileOpenArchive@@YGHPBDKKPAPAX@Z"
EndImport

SFileOpenArchive(@"test.mpq", 0, 0, @hMpq)
So far I've gotten a big list of linker errors, but after some research on the forum I've turned off switches here and there to get me down to just this.

Code: Select all

---------------------------
PureBasic - Linker error
---------------------------
POLINK: error: Unresolved external symbol '__imp___wassert'.

POLINK: fatal error: 1 unresolved external(s).
Been wracking my brain on this one guys, any help or ideas would be greatly appreciated.
Image
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: _imp__wassert linker errors with static lib

Post by Trond »

Maybe turn off asserts when compiling the lib?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: _imp__wassert linker errors with static lib

Post by Mistrel »

Ensure that you're compiling for unicode. Typically anything preceding by a "w" suggests that it's unicode.
jack
Addict
Addict
Posts: 1359
Joined: Fri Apr 25, 2003 11:10 pm

Re: _imp__wassert linker errors with static lib

Post by jack »

compile the Stormdll and use that instead, no polink errors.
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re: _imp__wassert linker errors with static lib

Post by SFSxOI »

You trying to hack a Blizzard game? Do as jack suggested, works and is the eaisiet way to use storm.
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
epidemicz
User
User
Posts: 86
Joined: Thu Jan 22, 2009 8:05 am
Location: USA
Contact:

Re: _imp__wassert linker errors with static lib

Post by epidemicz »

well im in the starcraft 2 beta, trying to parse replay files
Image
epidemicz
User
User
Posts: 86
Joined: Thu Jan 22, 2009 8:05 am
Location: USA
Contact:

Re: _imp__wassert linker errors with static lib

Post by epidemicz »

Well after a little more research into what assert is I found that if I #define NDEBUG before assert is included it gets rid of my problem. Hopefully everything still works correctly :D. Also, my reason for not using the stormdll is the lib is not dependant on having the storm.dll on your system. So, I'm sure blizz wouldn't want me redistributing their files, but im sure they dont like me helping people poking into them either.

Thanks for all the help guys, you def got me pointed in the right direction.
Image
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: _imp__wassert linker errors with static lib

Post by Mistrel »

The reason it compiles is because you've enabled "no debugging", hence no asserts are included. ;)
Post Reply