On Apr 7, 2006, at 9:24 PM, Sisyphus wrote:

Hi,

The following code builds and runs fine on linux (perl 5.8.8), but won't
compile on Win32 (perl 5.8.8):

use warnings;
use Inline C => Config =>
    BUILD_NOISY => 1;

use Inline C => <<'EOC';

#ifdef RUBBISH

void greet1() {
     printf("Hello 1\n");

//#else

//void greet1(){}

#endif

void greet2() {
     printf("Hello 2\n");
}

EOC

greet2();

__END__

'RUBBISH' is not defined on either box.

Here's the error I get on Win32:

try_pl_7b60.o(.text+0x7e):try_pl_7b60.c: undefined reference to `greet1'
collect2: ld returned 1 exit status
dmake:  Error code 129, while making
'blib\arch\auto\try_pl_7b60\try_pl_7b60.dll

I don't get it, where is there any reference to greet1() when RUBBISH is not defined?

This doesn't seem like an Inline-specific issue, you might have better luck debugging it in a pure C context.

 -Ken

Reply via email to