seandepagnier / weatherfax_pi

weather fax plugin for opencpn
GNU General Public License v3.0
20 stars 27 forks source link

ov50 appveyor.yml is failing 39 errors "macro definition of snprintf conflict" #116

Closed rgleason closed 5 years ago

rgleason commented 5 years ago

SEE this Log File please. 50 warnings 39 errors: (Note it compiles as ov42 wxWidgets 3.0.2)

I've seen the warning " Macro definition of snprintf conflicts" several times before. and also this error "tdio.h(1925): warning C4005: 'snprintf': macro redefinition"

Could use some help here. I've used pavel's iacfleet_pi appveyor.yml almost verbatim except retained the portaudio.exe download needed for windows. I have this error on several other plugins too. Pavel's iacfleet compiles here

but weatherfax on my "ov50" branch does not that fails.

Pavel's iacfleet_pi appveyor.yml file is here and

The weatherfax appveyor.yml file being used is here that fails

Fatal Errors

https://ci.appveyor.com/project/rgleason/weatherfax-pi/builds/22811541
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error:  Macro definition of snprintf conflicts with Standard Library function declaration [C:\project\weatherfax_pi\build\weatherfax_pi.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error:  Macro definition of snprintf conflicts with Standard Library function declaration [C:\project\weatherfax_pi\build\weatherfax_pi.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error:  Macro definition of snprintf conflicts with Standard Library function declaration [C:\project\weatherfax_pi\build\weatherfax_pi.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error:  Macro definition of snprintf conflicts with Standard Library function declaration [C:\project\weatherfax_pi\build\weatherfax_pi.vcxproj]

Many warnings

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition [C:\project\weatherfax_pi\build\weatherfax_pi.vcxproj]
"C:\project\weatherfax_pi\build\package.vcxproj" (default ta
rgleason commented 5 years ago

I thought I had found the problem when I found a pathname wrong, alas not.

rgleason commented 5 years ago

Stelian wrote: Didn't test it, but try removing the snprintf define from src/libaudiofile/config.h I tried that and compiled further.

I cannot find unistd.h in the working directories. I wonder where I can find it?

C:\project\weatherfax_pi\src\libaudiofile\File.cpp (42): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:\project\weatherfax_pi\build\weatherfax_pi.vcxpr  oj] C:\project\weatherfax_pi\src\libaudiofile\openclos e.cpp(28): fatal  error C1083: Cannot open include file: 'unistd.h': No such file or  directory [C:\project\weatherfax_pi\build\weatherfax_pi.vcxpr oj]

https://stackoverflow.com/questions/...ndows-visual-c A special one for MS Visual Studio? How do you handle that?

So I think we are headed down the wrong path now, but we've learned something. NOTE: This compiles for ov40 fine. There is a library missing I think.

rgleason commented 5 years ago

Did not intend to close this.

rgleason commented 5 years ago

This has been fixed in my repos.