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

Cannot compile chadstr.h using MSVC #15

Open
dhalucario opened this issue May 21, 2021 · 6 comments
Open

Cannot compile chadstr.h using MSVC #15

dhalucario opened this issue May 21, 2021 · 6 comments

Comments

@dhalucario
Copy link

main.c

#include "chadstr.h"

int main() {
	chadstr test = str("orange apple");
	return 0;
}

The result when I try to compile it:

D:\workspace\chadstr>cl /I. main.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29915 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

main.c
D:\workspace\chadstr\chadstr.h(69): fatal error C1112: compiler limit: '129' too many macro arguments, only '127' allowed
@skullchap
Copy link
Owner

solution to problem is simple, stop using meme compilers like msvc.

@dhalucario
Copy link
Author

dhalucario commented May 22, 2021

solution to problem is simple, stop using meme compilers like msvc.

For future reference, which compiler do you recommend? My my dead grandpa says Borland C is pretty good.

@skullchap
Copy link
Owner

solution to problem is simple, stop using meme compilers like msvc.

For future reference, which compiler do you recommend? My my dead grandpa says Borland C is pretty good.

Personally I use gcc. Clang has very close features to it and recently got support in Visual Studio projects

https://docs.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-160

@sneedcat
Copy link
Contributor

solution to problem is simple, stop using meme compilers like msvc.

For future reference, which compiler do you recommend? My my dead grandpa says Borland C is pretty good.

I use mingw from dorado bucket using scoop. I recommend it on Windows. I use Gentoo too, but there I use just gcc. But on windows, I really recommend mingw or clang. MSVC is outdated.

@ghost
Copy link

ghost commented May 30, 2021

feature

@matu3ba
Copy link

matu3ba commented Nov 27, 2024

solution to problem is simple, stop using meme compilers like msvc.

This stackoverflow thread https://stackoverflow.com/questions/9183993/msvc-variadic-macro-expansion suggests

@dhalucario Could you test, if /Zc:preprocessor works for you?

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

4 participants