Subject: Problems executing programs which includes rpcndr.h
From: David Salotti <[email-masked]>
To: [email-masked]
Date: Mon, 3 Sep 2001 18:51:45 +1000

Hi all,

I'm new to Windows programming - so be gentle :) I'm trying to get a COM client
up and running - but everytime I run the program I get a Seg fault. I've managed
to find the problem and it seems to be associated with "rpcndr.h". Is there any
special library that I need to include to make this work (I've pretty much
included all the libraries in w32api directory - no success).

Here's a sample program that will cause a failure:

#include <iostream>
#include <rpc.h>
#include <rpcndr.h>

using namespace std;

int
main (int argc, char **argv)
{
    cout << "Made it!" << endl;
    return EXIT_SUCCESS;
}

It compiles and links successfully using:

> g++ -Wall -g -o test test.cpp

When I run the program, I get the following:

   0 [main] test 1208 open_stackdumpfile: Dumping stack trace to
test.exe.stackdump
Segmentation fault (core dumped)

(it fails before the first line of the main())

test.exe.stackdump is:

Exception: STATUS_ACCESS_VIOLATION at eip=00000000
eax=0A0103B0 ebx=0A0103B0 ecx=61095A9C edx=00000000 esi=00433D74 edi=004332E0
ebp=0022FD44 esp=0022FCE8 program=f:\hack\thunder\tmp\test.exe
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame     Function  Args
End of stack trace

Commenting out rpcndr.h - all works fine. But since this file is been included
elsewhere (in my main program - not this test sample shown here) - I don't have
that luxury. 

Any clues on how this problem can be circumvented?

BTW: I'm using gcc v3.0

thanks heaps
Dave

ps: there was no core dump to speak of even though the Seg fault eluded to one
being dumped?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/