Package with included DLL

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Package with included DLL

gianvito
Hi all,
I need to link a library when I compile a source using pkg install.
The problem is that I should copy the DLL file in the "octave_path"\3.2.4_gcc-4.4.0\mingw32\bin before the compilation starts...is there a way to do this automatically?

If I just use the -l option to mkoctfile (in makefile) the installation works, but then when I execute the function, it says there is a missing dependency..
Is there a way to copy the dll file in that folder? Thanks

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Package with included DLL

gianvito
I just added a cp command in the makefile and it works...but is there a way to get the octave path? It isn't so good to statically copy to C:\octave\ directory...because it may be different...

any suggestion? Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Package with included DLL

andy buckle
On Thu, Jan 13, 2011 at 7:35 PM, gianvito <[hidden email]> wrote:
>
> I just added a cp command in the makefile and it works...but is there a way
> to get the octave path? It isn't so good to statically copy to C:\octave\
> directory...because it may be different...
>
> any suggestion? Thanks

maybe use this?

> OCTAVE_HOME
ans = C:\Octave\3.2.3_gcc-4.4.0

--
/* andy buckle */
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Pre_install and Post_install scripts (maybe a bug)

gianvito
I'm trying to do the operation with pre_install.m script in the package, but it returns the following message:

>>>invalid use of script in index expression
error: called from `pkg>prepare_installation' in file C:\Octave\3.2.4_gcc-4.4.0
\share\octave\3.2.4\m\pkg\pkg.m near line 1197, column 7
error: called from:
error:   C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\pkg\pkg.m at line 714,
column 5
error:   C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\pkg\pkg.m at line 287,
column 7


I went to that line ... and found this:
pre_install (desc);

If I change it to pre_install; it works !
Is this a bug or I'm doing something wrong?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Pre_install and Post_install scripts (maybe a bug)

gianvito
Well..I have just solved the problem. The bug is in the documentation, not in the code...

I can read this:

package/pre_install.m
This is an optional script that is run prior to the installation of a package.

But it hasn't to be a script but a function called pre_install with one argument...tha same is for post_install.m...