Tom
12:47 AM
hi its me from yesterday
 
hi :)
so, no luck?
 
Tom
Well, I've just returned to it, no luck though
 
you get the same error with -lcrypto ?
 
Tom
yes
I have openssl.exe in /usr/lib
would that be the binary I am trying to link against?
 
openssl.exe is not used ;)
 
Tom
12:49 AM
ok
 
/usr/lib/libcrypto.so
 
Tom
Do I need to build that file myself?
Its not there
 
No. You should have it already.
So you need to install libcrypto.
 
Tom
ok - its not a part of openssl?
 
nope.
 
Tom
12:52 AM
great. thanks. I'll give it a go.
 
on a Linux system no software should come with its own dependencies, unless they're exclusively designed for that software.
 
Tom
I see
that explains a lot of things :)
Incidentally, what is the proper way to install things in cygwin. I have just been running through the installer each time and selecting packages... is this normal?
 
that's generally a job the package managers do. They find out what is necessary to install SamplePackage, and download all dependencies and install them automatically. The problem is that cygwin has no package manager, and you have to install libraries (the dependencies) on your own.
@Tom I think that's the correct way. It has been a long time since I used cygwin last time :( No idea how it's today. But you might find some docs on the official website.
 
Tom
hmm
do not see libcrypto in the cygwin package selection screen.
 
Tom
1:15 AM
Looks like it may be a part of openssl-devel... downloading :)
nope
same old error :(
Thanks. These things have a way of making me feel like an idiot. I'm quite experienced in C# and Java, but a real baby in the C/C++ world.
Where am I supposed to obtain that libcrypto.so file?
 
@Tom not sure, but a quick search revealed openssl-devel contains libcrypto.a - you might be able link with it statically then.
 
Tom
ok... how?
 
To link statically, remove that -lcrypto, and add libcrypto.a to your list of object files. Let me check your script again.
 
Tom
build script looks like 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):
ppp = bld.new_task_gen('cxx', 'shlib', 'node_addon')
ppp.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl"]
ppp.chmod = 0755
ppp.target = 'ppp'
ppp.source = 'ppp.cc'
however, not sure quite what you mean by 'add libcrypto.a to your list of object files'
 
I'm reading the documentations. Just out of curiosity, are you familiar with this building tool? Did you chose it?
 
Tom
1:28 AM
No, its part of the node.js module system
its called node-waf and is 'just waf - the python build tool'
according to the docs.
 
Are you able to locate the libcrypto.a file?
 
Tom
yes
i also have libcrypto.dll.a
 
ok, add the following line to your script: ppp.use = 'libcrypto'
where is the libcrypto.a file located? /usr/lib?
 
Tom
ok, thanks
yes
 
alright, let me know how it goes.
 
Tom
1:36 AM
just about to try
yes
its there
 
so, does it work?
 
Tom
nope :(
same error
unbelievable
 
that's sad. I'm unable to help you much beyond that. I'd have to read WAF docs in order to solve that. Maybe you should update your question to mention what you have tried and also append the waf tag.
 
Tom
Well thanks a lot for your help. Really thought that was going to work.
 
The problem is exactly what I already answered, now you just need to figure out how to tell your building tool to find and compile your program with libcrypto.
 
Tom
1:46 AM
ok thanks
I wonder if its necessary to use this build tool
 
Good luck!
 
Tom
I suspect not
 
Probably not.
Gotta go. Don't give up.
 
Tom
:) I won't
Thx again.