wc-duck / datalibrary

Open Source Data Library for data serialization.
Other
42 stars 8 forks source link

strtof() multiple defined symbol at linktime #42

Closed lundmark closed 8 years ago

lundmark commented 8 years ago

It's a part of the standard library and simply defining it for all msc-versions won't work on msvc2015 (at least).

wc-duck commented 8 years ago

Ahh... yes. That entire code need to be looked at to see what to use to parse all these numbers. I'll start of by just not defining strtof() on 2015.

wc-duck commented 8 years ago

I do not have access to MSVC2015 here at home, do you know what _MSC_VER is set to there?

lundmark commented 8 years ago

I'm running 19.00.23506 so 1900... not sure where strtof is supported though...

lundmark commented 8 years ago

Seems like vs 2013 was the first version with it... which should be uhm 1700 I think?

lundmark commented 8 years ago

Nope sorry I think 2013 is vs 12.0 which is compiler version 1800

wc-duck commented 8 years ago

Would you be able to test out the pushed fix?

lundmark commented 8 years ago

I tested it... works on 2015 but not on 2013, so you need to compare with 1700 instead of 1900! Then it works perfectly.

wc-duck commented 8 years ago

but 1700 seems to be 2012? http://stackoverflow.com/questions/70013/how-to-detect-if-im-compiling-code-with-visual-studio-2008

lundmark commented 8 years ago

Well, I tried to run cl /? with my vs2013 and it showed 17.00-version, so visual studio 2012/2013 must share the same compiler then. Also the 2015-version showed 19.00. You can also look here:. https://msdn.microsoft.com/en-us/library/b0084kay(v=vs.120).aspx

And change between versions - I think the example shows the currently selected major version.

lundmark commented 8 years ago

Sorry yes you're right, 1800 is the right one!

lundmark commented 8 years ago

Not sure why my cl shows 1700 tho...

wc-duck commented 8 years ago

Is this still an issue?

lundmark commented 8 years ago

Nope!