artoolkit5 icon indicating copy to clipboard operation
artoolkit5 copied to clipboard

Compile errors with snprintf macro redefinition

Open mflux opened this issue 7 years ago • 5 comments

Same errors from https://github.com/artoolkit/artoolkit5 as https://github.com/artoolkit/artoolkit5/issues/379

Error	C1189	#error:  Macro definition of snprintf conflicts with Standard Library function declaration	nftBook	C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\stdio.h	1933	
Warning	C4005	'snprintf': macro redefinition	simpleOSG	C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\stdio.h	1931	
Error	C1189	#error:  Macro definition of snprintf conflicts with Standard Library function declaration	
simpleOSG	C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\stdio.h	1933	
Warning	C4005	'snprintf': macro redefinition	nftSimple	C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\stdio.h	1931	
Error	C1189	#error:  Macro definition of snprintf conflicts with Standard Library function declaration	nftSimple	C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\stdio.h	1933	
Warning	C4005	'snprintf': macro redefinition	nftBook	C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\stdio.h	1931	

It appears to be the definition of snprintf in some of these files. Removing them will allow me to compile correctly:

  • simpleOSG.c line 62
  • nftSimple.c line 62
  • nftBook.c line 63

mflux avatar Jan 17 '18 23:01 mflux

Are you certain you use the latest master from this fork?

ThorstenBux avatar Jan 17 '18 23:01 ThorstenBux

Absolutely certain :) Here's an md5 hash of what I pulled down:

Flux@ZENITH ~/Documents/projects/artx (master) $ git rev-parse HEAD de86622b8bd3105a388920907c4ce7ebbb383c34

and the latest commit https://github.com/artoolkitx/artoolkit5/commit/de86622b8bd3105a388920907c4ce7ebbb383c34

mflux avatar Jan 17 '18 23:01 mflux

Not sure how fast I can look into this, though

ThorstenBux avatar Jan 17 '18 23:01 ThorstenBux

It's fine, this issue isn't blocking me, just needed to put this down as an issue on github in case other users like me run into it. Thanks for your quick response!

mflux avatar Jan 17 '18 23:01 mflux

@mflux can you share your build environment, please. So that I can try to recreate that. Thanks

ThorstenBux avatar Jan 28 '18 09:01 ThorstenBux