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

Compiling HTTP example - no matching function for call to 'NerdCore::Class::Function::New()' #157

Open
DVLP opened this issue Feb 12, 2023 · 0 comments

Comments

@DVLP
Copy link

DVLP commented Feb 12, 2023

Simple code seems to compile well but http example doesn't

Frist tried in Windows 10, gcc 10.3.0
Then updated msys2 to the latest version, ran "pacman -S mingw-w64-ucrt-x86_64-gcc" so gcc 12.2.0
But I'm getting the same error:

[] Generating source file
[
] Compiling with preset: speed
In file included from C:\nerd.nerd\l4jwv\nerdcore/src/nerd.hpp:63,
from C:\nerd.nerd\l4jwv\index.cpp:35:
C:\nerd.nerd\l4jwv\index.cpp: In lambda function:
C:\nerd.nerd\l4jwv\index.cpp:135:40: error: no matching function for call to 'NerdCore::Class::Function::New()'
135 | var _res = __NERD_NEW(_protoRes)();
| ^
C:\nerd.nerd\l4jwv\nerdcore/src/macro.h:38:209: note: in definition of macro '__NERD_Create_Ptr_Scoped_Copy_Anon'
38 | #define __NERD_Create_Ptr_Scoped_Copy_Anon(CONTENT) new NerdCore::Type::function_t([=](NerdCore::VAR& __NERD_THIS, NerdCore::VAR* __NERD_VARARGS, int __NERD_VARLENGTH) mutable -> NerdCore::Global::var { CONTENT })
|
^~~~~~~~~~~
C:\nerd.nerd\l4jwv\index.cpp:117:27: note: in expansion of macro '__NERD_Create_Var_Scoped_Copy_Anon'
117 | http [ "createServer" ] = __NERD_Create_Var_Scoped_Copy_Anon ({ var _cb ; if ( __NERD_VARLENGTH > 0 ) _cb = __NERD_VARARGS[0];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\nerd.nerd\l4jwv\nerdcore/src/macro.h:45:103: note: in expansion of macro '__NERD_Create_Ptr_Scoped_Copy_Anon'
45 | #define __NERD_Create_Var_Scoped_Copy_Anon(CONTENT) NerdCore::VAR(NerdCore::Enum::Type::Function, __NERD_Create_Ptr_Scoped_Copy_Anon(CONTENT))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\nerd.nerd\l4jwv\index.cpp:121:21: note: in expansion of macro '__NERD_Create_Var_Scoped_Copy_Anon'
121 | app [ "listen" ] = __NERD_Create_Var_Scoped_Copy_Anon ({ var _port ; if ( __NERD_VARLENGTH > 0 ) _port = __NERD_VARARGS[0]; var _listenCB ; if ( __NERD_VARLENGTH > 1 ) _listenCB = __NERD_VARARGS[1];

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