Git Product home page Git Product logo

Comments (7)

springmeyer avatar springmeyer commented on August 28, 2024

I'm not aware of how to get a working Release build out of the existing Visual Studio file, so I just went with a gyp approach and upload my build to https://github.com/developmentseed/node-sqlite3/downloads.

from node-sqlite3.

springmeyer avatar springmeyer commented on August 28, 2024

the 'vcbuild.bat' is a hack that uses the gyp file I just added (undocumented). I can document how to utilize it on Monday. Ping me then, as I'm out for the weekend now.

from node-sqlite3.

cmundi avatar cmundi commented on August 28, 2024

Thanks! (And that for the phenomenally quick reply!) Have an excellent weekend! -- Carlos

from node-sqlite3.

cmundi avatar cmundi commented on August 28, 2024

Adding some notes for discussion on Monday.

Clean start. Grabbed the node 0.6.7 sources and built node in Release (' vcbuild.bat release' ). Works.

Downloaded a fresh copy of the windows branch of node-sqlite3. Still using VS GUI for node-sqlite3 build.
Made usual changes to project settings (disable precompiled headers, add include and lib paths, rename target to have .node extension instead of .dll extension)
Good: node-sqlite3 compiles and links in Release.

Copied the node-sqlite3.node to %HOME_DIR%\test\node_modules.
Tried to run the example on the node-sqlite3 homepage. FAIL!
Node says: TypeError: Object # has no method 'verbose'
So I remember that the Windows branch may differ from the master branch. Try this:

var s = require('node_sqlite3'); // ok
var d = new s.Database(':memory:'); // FAIL

The error is...

 undefined:0


 TypeError: undefined is not a function

and node terminates abnormally. Back at the command line, I'm not sure where to start looking.

I remember the warnings I saw when building node-sqlite3 about (not having) __declspec(dllexport) on templates within classes which do have __declspec(dllexport) decoration. I'm 90% sure that's cosmetic, as usual.

Next I do a full-tree diff between the master and windows branches of node-sqlite3. All the windows #ifdefs look good. Verified that VS really is building with _WIN32 to get the right threading model.

Looked at the new gyp stuff. Tried. I seem to be missing something. Will definitely need to ask springmeyer.

Encouraged, but not quite feeling the node-on-Windows love yet. :)

from node-sqlite3.

springmeyer avatar springmeyer commented on August 28, 2024

you need to make sure the node_sqlite3.node is copied into the lib folder and then you should put lib on your $NODEPATH. Then you do require('sqlite3');

from node-sqlite3.

cmundi avatar cmundi commented on August 28, 2024

Aha. I suspected (from grepping) for 'verbose' and learning that's
implementation was js stored in /lib) something like this. Thanks. I will
try this!
On Jan 10, 2012 8:18 PM, "Dane Springmeyer" <
[email protected]>
wrote:

you need to make sure the node_sqlite3.node is copied into the lib
folder and then you should put lib on your NODEPATH. Then you do
require('sqlite3');


Reply to this email directly or view it on GitHub:

#55 (comment)

from node-sqlite3.

cmundi avatar cmundi commented on August 28, 2024

Success!!! Sure enough. I missed (1) that having the js files in /lib is critical and (2) the name to 'require' depends a little on how which step in node's search logic finds it. Awesome. Thanks!

from node-sqlite3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.