python - C++ Why can't the linker see my files? -


building native module node.js under cygwin / windows:

i have monkey.cc file this:

#include <monkey/monkey.h> 

running

node-waf configure build 

i following

'configure' finished (0.351s) waf: entering directory `/usr/src/build' [2/2] cxx_link: build/default/monkey_1.o -> build/default/monkey.node build/default/libmonkey.dll.a creating library file: default/libmonkey.dll.a 

then following error:

default/monkey_1.o:/usr/src/build/../monkey.cc:144: undefined reference `_monkeyfoo' 

monkeyfoo defined in monkey.h in directory named monkey. running above command directory containing monkey directory , monkey.cc file.

edit:

wscript, python script node-waf runs looks this:

import os  srcdir = '.' blddir = './build' version = '0.0.2'  def set_options(opt):   opt.tool_options('compiler_cxx')  def configure(conf):   conf.check_tool('compiler_cxx')   conf.check_tool('node_addon')  def build(bld):   monkey = bld.new_task_gen('cxx', 'shlib', 'node_addon')   monkey.cxxflags = ["-g", "-d_file_offset_bits=64", "-d_largefile_source", "-wall", "-l/usr/lib", "-lssl"]   monkey.chmod = 0755   monkey.target = 'monkey'   monkey.source = 'monkey.cc' 

what missing???

that's linker error, not compiler error. have definition function? (not declaration.) , sure it's being linked in?


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -