Comments (10)
Try putting this in your own binding.gyp
(inside the outermost curly braces):
"msbuild_settings": {
"ClCompile": {
"RuntimeTypeInfo": "true"
}
}
I haven't tested it (Windows laptop is at home), but it might work...
from nbind.
I tired it just inside outermost "{", but it did not override the rtti setting. I also tried inside ...'OS=="win"', { ... but it failed to override there too.
from nbind.
Try putting the msbuild_settings
at the end instead of the beginning of the file, maybe the includes are overriding it otherwise.
from nbind.
Unfortunately, that did not work either.
from nbind.
OK, now I did some testing and managed to patch the xcode_settings
block so it should work similarly on Windows.
First of all, the lines I mentioned earlier can be at the beginning or end or even inside the targets
block, it doesn't matter.
Second, the official nbind.gypi
needs a patch. Line 63 should be:
"RuntimeTypeInfo%": "false"
I should probably add percent signs in various other places too. You can modify nbind code locally for now and I'll commit it to the official repo ASAP if it works.
from nbind.
Another thing I just noticed in my nbind project... it seems all my relative paths included from binding.gyp have an extra ../
For example:
'include_dirs': [
'C:/Program Files/boost/boost_1_62_0',
'../auto_discovery',
'../Logger',
'../utility',
'../iconv'
],
Inside my MSVS nbind Properties Pages / C/C++ / General /Additional Include Directories, these are listed as: ../../auto_discovery; ../../Logger; etc
from nbind.
Do you mean it produces a Visual Studio solution with incorrect paths? Have you used node-gyp
directly before and have you run into similar issues? If you're talking about paths manually entered into binding.gyp
producing unexpected results in Visual Studio solutions, there might be something else besides nbind causing it.
I think the paths are supposed to be relative to binding.gyp
and then it generates a solution under a new build
subdirectory next to it, so paths with a ../
prefix in binding.gyp
should have a ../../
prefix inside the build
directory to refer to the same file or directory. Wonder if I understood your situation correctly.
from nbind.
Yes, the VS sln has incorrect include/lib paths. If I use./<path>
in binding.gyp, it puts it in the correct place for me../<path>
so I can use that as a temporary workaround. Anyway, I have used node-gyp directly, but that project did not have relative paths so not sure if it was working ok... I can try looking into that.
from nbind.
node-gyp
modifies relative paths when producing files in different directories, so the target stays the same. Since the solution file is written in a new build
subdirectory (I can't find an option to change this), an additional ../
prefix will always appear. Problems should only show up if you want to move the solution somewhere else.
I think node-gyp
was mainly meant to compile, not produce a solution to use later. gyp
itself is made for that and has a --generator-output
option but node-gyp
doesn't expose it because then node
wouldn't find the binaries. See this node-gyp
issue.
from nbind.
This is piece of my binding.gyp. It doesn't work in Release build, but node-gyp default setting is Release build.
Sorry I don't know how to wrap my code.
"configurations": { 'Release': { 'VCLinkerTool': { 'AdditionalLibraryDirectories': [ 'C:/boost_1_67_0/stage/lib' ], }, 'VCCLCompilerTool': { 'ExceptionHandling': 1, 'RuntimeTypeInfo': 'true', 'AdditionalOptions': ['/GR'], } }, 'Debug': { 'defines': [ 'DEBUG', '_DEBUG' ], 'msvs_settings': { 'VCLinkerTool': { 'AdditionalLibraryDirectories': [ 'C:/boost_1_67_0/stage/lib' ], }, 'VCCLCompilerTool': { 'ExceptionHandling': 1, 'RuntimeTypeInfo': 'true' } } }
from nbind.
Related Issues (20)
- Delay in handoff from C++ to Node awaiter
- nbind doesn't work with electron-packager
- Can't pass char* from JS to cpp function HOT 1
- Windows | EMCC should have a batch file too. (emcc-path)
- Is there any way to call javascript method from c++ HOT 1
- Use of `eval` violates Content Security Policy in browsers HOT 7
- Incompatible with electron 4 and later? HOT 4
- NBind not working with Node 12.0.0
- Release on Node12 HOT 9
- Fail to build with electron 5.0.8, deprecated methods
- Problem when using with proton native HOT 1
- Node 13 build errors HOT 2
- unresolved external
- unresolved external HOT 2
- sample app refuses to run
- npm i produces error "type-check is deprecated" and "Type 'string' cannot be used to index type 'ExportType'."
- Error while dooing fourth step HOT 5
- Iterator support?
- Is this project dead? HOT 2
- std::string support is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbind.