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

Compilation error on Windows #250

Open
ianshade opened this issue Aug 30, 2018 · 4 comments
Open

Compilation error on Windows #250

ianshade opened this issue Aug 30, 2018 · 4 comments

Comments

@ianshade
Copy link

I'm getting the following error when I'm trying to compile the latest version with Visual Studio 2017:

13>d:\source\repos\libsourcey\src\net\src\ssladapter.cpp(194): error C2131: expression did not evaluate to a constant 13>d:\source\repos\libsourcey\src\net\src\ssladapter.cpp(194): note: failure was caused by a read of a variable outside its lifetime 13>d:\source\repos\libsourcey\src\net\src\ssladapter.cpp(194): note: see usage of 'npending' 13>d:\source\repos\libsourcey\src\net\src\ssladapter.cpp(206): error C2131: expression did not evaluate to a constant 13>d:\source\repos\libsourcey\src\net\src\ssladapter.cpp(206): note: failure was caused by a read of a variable outside its lifetime 13>d:\source\repos\libsourcey\src\net\src\ssladapter.cpp(206): note: see usage of 'npending'

Does it have something to do with lack of support for variable length arrays in MSVC?

@0xdeadbeef-7a1e
Copy link

0xdeadbeef-7a1e commented Nov 6, 2018

I'm struggling with this. is there any news regarding this issue?

@ianshade
Copy link
Author

ianshade commented Nov 8, 2018

I unfortunately haven't found any solutions. I gave up trying to use this library.

@0xdeadbeef-7a1e
Copy link

0xdeadbeef-7a1e commented Nov 8, 2018

Well, i did find a solution for that specific error:
char buffer[npending]; -> char* buffer = new char[npending];

VS compiler does not support variables as an index.

@raz-ai
Copy link

raz-ai commented Nov 22, 2018

@gerarq I ended up doing the same thing with the arrays in msvc. I opened up an issue on the same thing just recently, along with some deprecated #defines.

#256

Did it work well for you after that? I haven't yet tested out the code that fix touches.

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