----- Original Message -----
From: "Sisyphus" <[EMAIL PROTECTED]>

<snip>
>
> So, when I tried to build a module, I simply did the same. The inline C
code
> starts off with:
> #include "arrays.h"
> #include "arrays.c"
> and the three files are placed in the cwd alongside makefile.pl,
> My_module.pl, manifest, etc.

Typo .... should be 'My_module.pm'.

>
> But this doesn't work. I get the following linker error:
> LINK : fatal error LNK1181: cannot open input file "My_module.obj".
>
> I've checked that this problem is due to the attempted inclusion of the
> typemap (and associated files arrays.h and arrays.c) - and it is. But I'm
> clueless as to how to remedy the problem, or where to look to find the
> answer.
>

For anyone curious, I finally muddled my way through to the solution. The
problem was caused by placing the 3 files in the *same* directory as
'makefile.pl, 'My_module.pm', 'Manifest', etc.

As soon as I created a sub directory (which I named 'extras') and placed
'arrays.c', 'arrays.h', and 'typemap' in there, all I then had to do was
start the C code with
C => Config => TYPEMAPS => 'extras/typemap';
#include "extras/arrays.h"
#include "extras/arrays.c"
and all was sweet.

I couldn't find this requirement spelled out in any of the documentation,
and the error message was less than helpful. Is this just a microsoft
windows thing ? Or perhaps it's assumed that anyone with half a brain would
know that extra files must be placed elsewhere than in the build directory
:-)

Cheers,
Rob

Reply via email to