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

How to enable RTTI on Windows? #857

Closed
strrchr opened this issue Jan 9, 2016 · 6 comments
Closed

How to enable RTTI on Windows? #857

strrchr opened this issue Jan 9, 2016 · 6 comments

Comments

@strrchr
Copy link

strrchr commented Jan 9, 2016

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\memory(883): warning C 4541: 'dynamic_cast' used on polymorphic type 'rocksdb::TableFactory' with /GR-; unpr edictable behavior may result (compiling source file ..\deps\rocksdb\tools\sst_dump_t ool.cc) [D:\home\js\modules_by_me\rocksdown\build\rocksdb.vcxproj]

I tried these, but it seems not work.


    'conditions': [
        ['OS=="win"', {
            'msvs_settings': {
                'VCCLCompilerTool': {
                    'RuntimeTypeInfo': 'true',
                    'EnableFunctionLevelLinking': 'true',
                    'ExceptionHandling': '2',
                    'DisableSpecificWarnings': [ '4355', '4530' ,'4267', '4244' ],
                }
            },
            'cflags!': [ '/GR-' ],
            'cflags+': [ '/GR+' ],
@bnoordhuis
Copy link
Member

'RuntimeTypeInfo': 'true' is the right switch. Not sure why it isn't working for you.

@graysonlang
Copy link

I've seen this issue and the fix appears to be set the value in both Debug and Release configurations. Otherwise it doesn't properly override the default setting.

'conditions': [
  ['OS=="win"', {
    'configurations': {
      'Debug': {
        'msvs_settings': {
          'VCCLCompilerTool': {
            'RuntimeTypeInfo': 'true',
          },
        }
      }, # Debug
      'Release': {
          'VCCLCompilerTool': {
            'RuntimeTypeInfo': 'true',
          },
        },
      }, # Release
    }, # configurations
  } ], # OS=="win"
], # conditions

@bnoordhuis
Copy link
Member

Looks like this is resolved. I'll close.

@jvallesf
Copy link

I've seen this issue and the fix appears to be set the value in both Debug and Release configurations. Otherwise it doesn't properly override the default setting.

'conditions': [
  ['OS=="win"', {
    'configurations': {
      'Debug': {
        'msvs_settings': {
          'VCCLCompilerTool': {
            'RuntimeTypeInfo': 'true',
          },
        }
      }, # Debug
      'Release': {
          'VCCLCompilerTool': {
            'RuntimeTypeInfo': 'true',
          },
        },
      }, # Release
    }, # configurations
  } ], # OS=="win"
], # conditions

This has been the solution in my case. Thanks!

@mmppeegg
Copy link

I've seen this issue and the fix appears to be set the value in both Debug and Release configurations. Otherwise it doesn't properly override the default setting.

I still fail on Release build...
Excuse me, may I know your version?
Mine:
Electron: 5.0.13
gode-gyp: 7.1.1
Visual Studio: VS2017 community
node: 10.16.0
bindings: 1.5.0

@jvallesf
Copy link

In my case, I don't use node-gyp anymore, I compile the bindings directly with Visual Studio. But at the time I was using the following:

Electron: 5.0.6
node-gyp: 5.0.3
Visual Studio: VS2015 community
node: 12.6.0

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

5 participants