[ghemical-devel] Linking libghemical to other software

Rob Schellhorn rschellhorn at xs4all.nl
Mon Jul 17 06:09:00 EDT 2006


Hi,

I'm building a plug-in for Bioclipse (http://www.bioclipse.net/) for which 
I like to use libghemical's capabilities to do MM and QM calculations. The 
target platforms are Linux and Windows (OS-X possible later).

In Windows I have installed Cygwin and installed LibGhemical as described in
the INSTALL file, resulting in these files:
- /usr/local/lib/libghemical.a
- /usr/local/liblibghemical.am
- the parameter files under /usr/local/share/libghemical

I've made my dll using:
gcc	-mno-cygwin
	-I*some stuff I need*
	-L/usr/local/lib
	-shared
	-Wl,--add-stdcall-alias
	*my cpp*
	-lghemical
	-lstdc++
	-o ghemical.dll

Now I want to use the dll OUTSIDE a Cygwin environment. The problem is that 
the dll crashes when trying to access the parameter files under 
/usr/local/share/libghemical, because this path does not exists in Windows 
of course.

So my question:
Is it possible to adapt the source of libghemical so it is no longer
dependant 
of those parameter files? (e.g. embed them in source...)
If this is not possible, can I change the search path for the parameter
files 
relative to the started application.

Note that the 'official' Windows port seems to be broken... when started 
it goes to 100% cpu and stays there. It is possible however that this
problem
is Visual Studio 2005 related.

With kind regards,
Rob Schellhorn



More information about the ghemical-devel mailing list