Raised This Month: $12 Target: $400
 3% 

Extension compiler: unresolved external symbol __snwprintf


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Merudo
Senior Member
Join Date: Feb 2016
Old 03-24-2016 , 12:20   Extension compiler: unresolved external symbol __snwprintf
Reply With Quote #1

I'm trying to compile a library but I get the following message:

Code:
 tier1.lib(strtools.obj) : error LNK2019: unresolved external symbol __snwprintf referenced in function "int __cdecl V_snwprintf(wchar_t *,int,wchar_t const *,...)" (?V_snwprintf@@YAHPA_WHPB_WZZ)
I'm pretty sure all my links are proper and I have no idea how to fix it.

EDIT: I'm using visual studio community 2015 RC, could that be it?
__________________

Last edited by Merudo; 03-24-2016 at 12:23.
Merudo is offline
Merudo
Senior Member
Join Date: Feb 2016
Old 03-24-2016 , 12:42   Re: Extension compiler: unresolved external symbol __snwprintf
Reply With Quote #2

Solved, it was indeed a VS 2015 error. I added legacy_stdio_definitions.lib to the linker and it now works.
__________________
Merudo is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-24-2016 , 15:26   Re: Extension compiler: unresolved external symbol __snwprintf
Reply With Quote #3

Last I heard, you can't build SourceMod extensions with Visual Studio 2015 as it's not binary compatible with the versions Valve uses (2008?).

So... you may need to use Visual Studio 2013 to compile it.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Merudo
Senior Member
Join Date: Feb 2016
Old 03-24-2016 , 21:11   Re: Extension compiler: unresolved external symbol __snwprintf
Reply With Quote #4

Where did you hear that?

The extension compiled just fine for me once I added legacy_stdio_definitions.lib. There are some breaking changes in VS2015 but most can be worked around
__________________
Merudo is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-24-2016 , 21:28   Re: Extension compiler: unresolved external symbol __snwprintf
Reply With Quote #5

Quote:
Originally Posted by Merudo View Post
Where did you hear that?

The extension compiled just fine for me once I added legacy_stdio_definitions.lib. There are some breaking changes in VS2015 but most can be worked around
Once compiled, the ABI should be mostly compatible. However, the latest mysqlclient lib that we have tested and compile against will throw errors for missing symbols, even with your workaround. Additionally, on CS:GO, there are likely ABI conflict issues when using a version of libprotobuf compiled against VS2015 and reading/sending usermessages.
psychonic is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode