This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

_beginthread Problems with win95 and mingw32 using C++


Dear Friends,

I have encountered a problem using C++ with the _beginthread(VOID  (*)(PVOID),
unsigned, void *)  function which is part of the windows95 operating system that
allows concurrent execution of multiple threads.  the following program compiles
and runs fine as a C program but dies at the compilation proper stage for C++
as shown below.  I am using gnu-win32b18 /w Mingw32.  I am running windows95
(not that this really changes much).  I was able to solve the error below by
commenting out the "__attribute__((__cdecl__))"  portion, but then when I
attempt to use the _beginthread() finction I get an ld message that says
"undefined reference to _beginthread(<ommeted>)"  ld fatal signal 1"  this also
doesn't happen in "C".  Please help.

thanks,

John Miller

test.c/test.cc:
#include <windows.h>
#include <nonansi/process.h>
#include <stdio.h>

int main(void)
{
  printf("hello world");
 return 0;
}


D:\mingw32\st20b\test>gcc -c test.cc -o test.o
In file included from test.cc:2:
d:\\mingw32\\include/nonansi/process.h:86: warning: `__cdecl__' attribute
ignored
d:\\mingw32\\include/nonansi/process.h:87: `type name' declared as function
returning a function
d:\\mingw32\\include/nonansi/process.h:87: warning: ANSI C++ forbids
declaration`pfuncStart' with no type or storage class
GCC.EXE: Internal compiler error: program cc1plus got fatal signal 33

D:\mingw32\st20b\test>


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]