Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curl is hard coded to off for all Windows #29

Open
kmilos opened this issue Sep 25, 2024 · 1 comment
Open

Curl is hard coded to off for all Windows #29

kmilos opened this issue Sep 25, 2024 · 1 comment

Comments

@kmilos
Copy link
Contributor

kmilos commented Sep 25, 2024

From the readme: -DUSE_CURL=OFF (default is ON, but unavailable in MS Visual Studio)

IF(NOT WIN32)

However, there should be no problem using it w/ MinGW, which is also covered by the CMake WIN32 define.

Did you perhaps mean if(NOT MSVC) here instead?

Same goes for the USE_BZIP2 gating as well - there's no real reason it wouldn't work w/ MinGW...

@kmilos
Copy link
Contributor Author

kmilos commented Sep 25, 2024

Ah, this fails for another reason, it's not just MSVC only... Looks like there is symbol clash also w/ MinGW:

FAILED: CMakeFiles/cfitsio.dir/cfileio.c.obj 
  D:\M\msys64\clang64\bin\clang.exe -DCFITSIO_HAVE_CURL -DHAVE_FTRUNCATE -DHAVE_UNISTD_H -D_REENTRANT -IC:/_/B/src/cfitsio-4.5.0 -IC:/_/B/src/static-CLANG64 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1 -D_LARGEFILE_SOURCE=ON -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -msse2 -MD -MT CMakeFiles/cfitsio.dir/cfileio.c.obj -MF CMakeFiles\cfitsio.dir\cfileio.c.obj.d -o CMakeFiles/cfitsio.dir/cfileio.c.obj -c C:/_/B/src/cfitsio-4.5.0/cfileio.c
  In file included from C:/_/B/src/cfitsio-4.5.0/cfileio.c:16:
  In file included from D:/M/msys64/clang64/include/curl/curl.h:81:
  In file included from D:/M/msys64/clang64/include/winsock2.h:23:
  In file included from D:/M/msys64/clang64/include/windows.h:69:
  In file included from D:/M/msys64/clang64/include/windef.h:9:
  In file included from D:/M/msys64/clang64/include/minwindef.h:163:
  D:/M/msys64/clang64/include/winnt.h:384:25: error: expected identifier or '('
  
    384 |   typedef unsigned char TBYTE, *PTBYTE;
  
        |                         ^
  
  C:/_/B/src/cfitsio-4.5.0/fitsio.h:223:22: note: expanded from macro 'TBYTE'
  
    223 | #define TBYTE        11
  
        |                      ^
  
  1 error generated.

May I suggest simply renaming your TBYTE to e.g. T_BYTE everywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant