Skip to content

Dynamic linker fixups #4

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"targets": [
{
"target_name": "oracle_bindings",
"sources": [ "src/connection.cpp",
"src/oracle_bindings.cpp",
"sources": [ "src/connection.cpp",
"src/oracle_bindings.cpp",
"src/executeBaton.cpp",
"src/outParam.cpp",
"src/reader.cpp",
Expand All @@ -15,43 +15,45 @@
"GCC_ENABLE_CPP_RTTI": "YES"
},
"variables": {
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
},
"libraries": [ "-locci", "-lclntsh", "-lnnz11" ],
"link_settings": {"libraries": [ '-L<(oci_lib_dir)'] }
"link_settings": {"libraries": [ "-L<(oci_lib_dir)"] }
}],
["OS=='linux'", {
"variables": {
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
"oci_include_dir%": "<!(if [ -z $OCI_INCLUDE_DIR ]; then echo \"/opt/instantclient/sdk/include/\"; else echo $OCI_INCLUDE_DIR; fi)",
"oci_lib_dir%": "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
},
"link_settings": {
"libraries": [ "-L<(oci_lib_dir)", "-lclntsh", "-lnnz12", "-locci" ],
"ldflags": [ "-Wl,-rpath,<(oci_lib_dir)" ],
},
"libraries": [ "-locci", "-lclntsh", "-lnnz12" ],
"link_settings": {"libraries": [ '-L<(oci_lib_dir)'] }
}],
["OS=='win'", {
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "2"
}
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "2"
}
},
},
"Debug": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "3"
}
},
},
},
"Debug": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "3"
}
},
}
},
},
"variables": {
"oci_include_dir%": "<!(IF DEFINED OCI_INCLUDE_DIR (echo %OCI_INCLUDE_DIR%) ELSE (echo C:\oracle\instantclient\sdk\include))",
"oci_lib_dir%": "<!(IF DEFINED OCI_LIB_DIR (echo %OCI_LIB_DIR%) ELSE (echo C:\oracle\instantclient\sdk\lib\msvc))",
},
# "libraries": [ "-loci" ],
"link_settings": {"libraries": [ '<(oci_lib_dir)\oraocci12.lib'] }
"link_settings": {"libraries": [ "<(oci_lib_dir)\oraocci12.lib"] }
}]
],
"include_dirs": [ "<(oci_include_dir)", "<!(node -e \"require('nan')\")" ],
Expand All @@ -60,5 +62,3 @@
}
]
}


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"mocha": "~1.18.2"
},
"scripts": {
"test": "./node_modules/.bin/mocha -R spec --timeout 10000 test/*.js"
"test": "env DYLD_BIND_AT_LAUNCH=1 LD_BIND_NOW=1 ./node_modules/.bin/mocha -R spec --timeout 10000 test/*.js"
},
"main": "./index.js",
"license": {
Expand Down