libsass compilation fails on Visual Studio 2017

Created on 7 Apr 2018  ·  4Comments  ·  Source: sass/libsass

Trying to compile libsass on Visual Studio 2017 on Windows fails with error(s):

operation.hpp(191): error C2027: use of undefined type 'Sass::Selector_List'
operation.hpp(191): error C2027: use of undefined type 'Sass::Complex_Selector'
...

(Errors are repeating themselves, just with different classes).

I'm not very familiar with the code, but changing typeid to use x instead of *x:

throw std::runtime_error(msg + typeid(*x).name());

to:

throw std::runtime_error(msg + typeid(x).name());

Allows libsass to compile successfully.

Bug - Maybe

Most helpful comment

I get the same build errors and can confirm the change @Nimce reports does in fact let the build complete on my machine.

All 4 comments

I compiled it just now with MSVC 2017 and can't reproduce, the change is definitely not dangerous, since it only affects error reporting if CRTP implementation is missing some types. But as I said, can't reproduce ...

I get the same build errors and can confirm the change @Nimce reports does in fact let the build complete on my machine.

I also confirm these build errors and confirm the remedy provided by @Nimce works perfectly. I could compile entire sassc.exe using this tip.

Hi I can also confirm that @Nimce solution fix the issue for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexisVK picture AlexisVK  ·  5Comments

GottZ picture GottZ  ·  3Comments

catamphetamine picture catamphetamine  ·  7Comments

JohnMica picture JohnMica  ·  3Comments

bertusgroenewegen picture bertusgroenewegen  ·  6Comments