[PD] cannot create moonlib/absolutepath on Windows

Claude Heiland-Allen claude at mathr.co.uk
Sun Aug 16 15:32:36 CEST 2015


Windows has a different notion of paths to unix-like systems, including 
drive specifiers.

The first line of moonlib/absolutepath.c[1] is

     #ifndef _WIN32

so the file is empty when compiling for Windows.  (Perhaps it could 
contain an alternative implementation that prints a more useful error 
message.)

The non-Windows implementation uses dirname() from libgen.h, which isn't 
available on Windows as far as I can tell.  A suggested alternative is 
_splitpath_s[2].

[1] 
http://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/moonlib/absolutepath.c#l1
[2] https://msdn.microsoft.com/en-us/library/8e46eyt7.aspx

On 16/08/15 14:11, Gilberto Agostinho via Pd-list wrote:
> Hello all,
>
> I had previously released a small abstraction of a visual keyboard for
> Pd (see:
> http://forum.pdpatchrepo.info/topic/8584/keyboards-gui-for-midi/1 ), but
> I had tested it only on Linux. Now, I got some reports from Windows
> users that they can't create [moonlib/absolutepath] on their system,
> which I used in that abstraction. They get the following error message:
>
> ...couln't create {new line} load_object: Symbol "absolutepath_setup"
> not found.
>
> We did some troubleshooting, and here is what we found:
>
> - [import moonlib] does not make any difference
> - nor does using [moonlib/absolutepath] instead of [absolutepath]
> - they are able to create other moonlib externals, such as [image],
> [mknob], etc.
> - the last line of the source code for absolutepath says /* NOT _WIN32
> */ but the problem is present on Windows 64-bit
>
> Has anyone else encountered this problem? And does anyone know a
> solution to it?
>
> Cheers,
> Gilberto Agostinho
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list




More information about the Pd-list mailing list