Re: undefined referenced to 'crypt'
Posted in 1998
On 14 Oct 1998, David C. Harrison wrote: > > i tried to compile a file, with this command : > > esql -o demo demo1.ec > > then appeared error message : > > /root/esql/lib/esql/libixos.so undefined reference to 'crypt' > > so the compilation is failed. what's going on, and how to fix it ? > > thanks. > > ps. i'm using esql/c for linux > > An easy way is to add the function like so: > > void crypt() {} > > to one of your source files and re-compile. And you'd expect your program to work? The genuine article has the interface: extern char *crypt(const char *key, const char *salt); If the dummy version above was called, then you're pretty much guaranteed a core dump or other memory corruption, aren't you. Don't try this unless you know exactly what you are doing, please! And making this suggestion indicates that you probably don't know exactly what you are doing. > Are you using the package on an unsuported distribution? I'm using it on > Red Hat Linux 5.1, which is not an officialy supported distribution yet. But which can be made to work with a minimum of effort... At least, the fix I posted y'day certainly is working quite happily for me on a couple of Redhat 5.1 machines. > BTW - there is probably a better way that this, but I've not found it yet. See my previous posting with patch. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn