delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/12/04/21:10:44

From: jfmiller AT polymail DOT cpunix DOT calpoly DOT edu (John Miller)
Subject: _beginthread Problems with win95 and mingw32 using C++
4 Dec 1997 21:10:44 -0800 :
Message-ID: <3487421B.1637356E.cygnus.gnu-win32@polymail.calpoly.edu>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019