Skip to content

Commit 47646ec

Browse files
committed
Change configuration to compile without errors on windows.
1 parent 56613f6 commit 47646ec

File tree

2 files changed

+73
-21
lines changed

2 files changed

+73
-21
lines changed

binding.gyp

Lines changed: 71 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,81 @@
6565
}
6666
}
6767
],
68-
["OS=='win'", {
69-
"variables" : {
70-
"oci_lib_dir%": "<!(IF DEFINED OCI_LIB_DIR (echo %OCI_LIB_DIR%) ELSE (echo C:\oracle\instantclient\sdk\lib\msvc))",
71-
"oci_inc_dir%": "<!(IF DEFINED OCI_INC_DIR (echo %OCI_INC_DIR%) ELSE (echo C:\oracle\instantclient\sdk\include))",
72-
},
73-
"configurations" : {
74-
"Release" : {
75-
"msvs_settings": {
76-
"VCCLCompilerTool" : {
77-
"RuntimeLibrary" : "2"
68+
[
69+
"OS=='win'", {
70+
"variables" : {
71+
"oci_lib_dir%": "<!(IF DEFINED OCI_LIB_DIR (echo %OCI_LIB_DIR%) ELSE (echo C:\oracle\instantclient\sdk\lib\msvc))",
72+
"oci_inc_dir%": "<!(IF DEFINED OCI_INC_DIR (echo %OCI_INC_DIR%) ELSE (echo C:\oracle\instantclient\sdk\include))",
73+
},
74+
"link_settings": {
75+
"libraries": [
76+
"-loci",
77+
]
78+
},
79+
"configurations" : {
80+
"Release" : {
81+
"msvs_settings": {
82+
"VCCLCompilerTool": {
83+
"RuntimeLibrary": 0,
84+
"Optimization": 3,
85+
"FavorSizeOrSpeed": 1,
86+
"InlineFunctionExpansion": 2,
87+
"WholeProgramOptimization": "true",
88+
"OmitFramePointers": "true",
89+
"EnableFunctionLevelLinking": "true",
90+
"EnableIntrinsicFunctions": "true",
91+
"RuntimeTypeInfo": "false",
92+
"PreprocessorDefinitions": [
93+
"WIN32_LEAN_AND_MEAN"
94+
],
95+
"ExceptionHandling": "0",
96+
"AdditionalOptions": [
97+
"/EHsc"
98+
]
99+
},
100+
"VCLibrarianTool": {
101+
"AdditionalOptions": [
102+
"/LTCG"
103+
]
104+
},
105+
"VCLinkerTool": {
106+
"LinkTimeCodeGeneration": 1,
107+
"OptimizeReferences": 2,
108+
"EnableCOMDATFolding": 2,
109+
"LinkIncremental": 1,
110+
"AdditionalLibraryDirectories": [
111+
"<(oci_lib_dir)"
112+
]
113+
}
78114
}
79115
}
80116
},
81-
"Debug" : {
82-
"msvs_settings": {
83-
"VCCLCompilerTool" : {
84-
"RuntimeLibrary" : "3"
85-
}
117+
"Debug": {
118+
"msvs_settings": {
119+
"VCCLCompilerTool": {
120+
"PreprocessorDefinitions": [
121+
"WIN32_LEAN_AND_MEAN"
122+
],
123+
"ExceptionHandling": "0",
124+
"AdditionalOptions": [
125+
"/EHsc"
126+
]
127+
},
128+
"VCLibrarianTool": {
129+
"AdditionalOptions": [
130+
"/LTCG"
131+
]
132+
},
133+
"VCLinkerTool": {
134+
"LinkTimeCodeGeneration": 1,
135+
"LinkIncremental": 1,
136+
"AdditionalLibraryDirectories": [
137+
"<(oci_lib_dir)"
138+
]
139+
}
140+
}
86141
}
87-
}
88-
},
89-
"cflags" : ['-fexceptions -EHsc'],
90-
"cflags_cc" : ['-fexceptions -EHsc'],
91-
"link_settings" : { "libraries" : ['<(oci_lib_dir)\oci.lib'] }
92-
}
142+
}
93143
],
94144
],
95145
"include_dirs" : [ "<(oci_inc_dir)",

src/njs/src/njsUtils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
#define __NJSUTILS_H__
2828

2929
#include <node.h>
30+
3031
#include "nan.h"
32+
3133
#include "njsMessages.h"
3234

3335
// User specified data types for binds and defines.

0 commit comments

Comments
 (0)