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

First Example in README breaks in Mac #1

Open
Kully opened this issue Nov 10, 2020 · 9 comments
Open

First Example in README breaks in Mac #1

Kully opened this issue Nov 10, 2020 · 9 comments

Comments

@Kully
Copy link
Collaborator

Kully commented Nov 10, 2020

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.

@glouw
Copy link
Owner

glouw commented Nov 27, 2020

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

@glouw glouw closed this as completed Nov 27, 2020
@RoyiAvital
Copy link

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

@glouw
Copy link
Owner

glouw commented Dec 30, 2020

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

@RoyiAvital
Copy link

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

@glouw
Copy link
Owner

glouw commented Dec 30, 2020

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 glouw reopened this Dec 30, 2020
@RoyiAvital
Copy link

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.

@glouw
Copy link
Owner

glouw commented Dec 30, 2020

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.

@RoyiAvital
Copy link

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.

@glouw
Copy link
Owner

glouw commented Dec 30, 2020

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

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

3 participants