ctl icon indicating copy to clipboard operation
ctl copied to clipboard

First Example in README breaks in Mac

Open Kully opened this issue 5 years ago • 9 comments

Steps to Recreate

  • Put a file called main.c in the root directory
  • Copy the code from the first example in the README into main.c
  • Run gcc main.c -isystem ctl

You get this error image

NB Removing the (__compar_fn_t) type cast sadly does not solve the bug.

Kully avatar Nov 10 '20 00:11 Kully

Thanks, qsort has been removed entirely and replaced with an inline sort

glouw avatar Nov 27 '20 21:11 glouw

By the way, why C99 and not C17? Moving to C11 / C17 will allow MSVC compatibility (MSVC now fully supports C11 / C17).

RoyiAvital avatar Dec 30 '20 10:12 RoyiAvital

I'll boot up windows today and check and run the examples against MSVC - stay posted

glouw avatar Dec 30 '20 17:12 glouw

Great. Make sure you use MSVC 16.8 for C11 / C17 support.

RoyiAvital avatar Dec 30 '20 18:12 RoyiAvital

I have bumped up the support to C11. I compiled with the Developer Command Prompt (19.28,29335) for VS2019 on Windows 10 with cl /I ctl /std:c11 test.c without any problems. Let me know if you are still stuck

glouw avatar Dec 30 '20 19:12 glouw

OK. Now all needed is to have CMake / Meson / XMake build with Windows support (For testing under Windows) and it will be perfect.

Thank You.

RoyiAvital avatar Dec 30 '20 19:12 RoyiAvital

Maybe try a unity build? Unity builds hold back C++ with compile times, but CTL compiles exponentially quicker. You can even get creative with pre-compiled headers for some of the more basic templates to speed up your compile times even further.

glouw avatar Dec 30 '20 19:12 glouw

I will try replicate your Makefile in XMake just to see if everything (Tests) runs on Windows. Then you'll be able to make Windows' tests as part of the CI.

RoyiAvital avatar Dec 30 '20 20:12 RoyiAvital

I do not know if the github machines support MSVC - they are ubuntu images I believe

glouw avatar Dec 30 '20 20:12 glouw