Subject: R:Problem Compiling simple app
From: [email-masked] (Gallo Antonio antga BNL)

1 Dec 1998 12:40:40 -0800
Message-ID: <c=IT%a=master400%p=Olivetti%l=[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: "[email-masked]'" <[email-masked]>
Cc: "'Donald Sharp'" <[email-masked]>

First i would like to thanks "Donald Sharp" and "Earnie Boyd" for their
precious answers; second ....

>>>1)  it would help the list tremondously if you where to 
>>>post the program in question.

Here you are the result ...

C:\WINDOWS>cd \ptc072
C:\ptc072>cd demos
C:\ptc072\DEMOS>cd logo
C:\ptc072\DEMOS\LOGO>cygnus logo release
Building "logo.cpp" : Cygnus GNU-Win32 release
/CYGNUS/B19/H-I386~1/i386-cygwin32/bin/ld.exe: warning: cannot find
entry symbol
 _WinMainCRTStartup; defaulting to 00401000
C:\ptc072\DEMOS\LOGO>

of compiling this (it's 9KB i cutted out unusefull code) ...

//////////////
// PTC logo //
//////////////
#include "ptc.h"

	// Big Text Cut Here

#ifdef __WIN32__

int APIENTRY WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR
lpCmdLine,int nCmdShow)
{
    // initialize ptc (win32)
    PTC ptc(320,200);
    if (!ptc.ok())
    {
        // failure
        ptc.Error("could not initialize");
        return 1;
    }

    // set title
    ptc.SetTitle("ptc logo");

#else

int main(int argc,char *argv[])
{
    // initialize ptc (dos)
    PTC ptc(320,200,argc,argv);
    if (!ptc.ok())
    {
        // fallback to virtual 32bit
        if (!ptc.Init(320,200))
        {
            // failure
            ptc.Error("could not initialize");
            return 1;
        }
    }

#endif

	// Big Text Cut Here
    return 0;
}

IT'S IMPORTANT TO NOTE THAT THE PROGRAM NOW DOES NOT CORE-DUMP NEVER
MORE ...
.... BECAUSE I JUST REBUILDED THE PTC-LIBRARY WITH MY GNUWIN32.
IT WORKS FINE & FASTER ....

.... HOWEVER THIS WARNINGS REMAIN, WHY ???

OTHER EXAMPLESE THAT SIMPLY USE:
	int main() {}
DON'T SHOW THIS WARNING ....

.... ELSE WICH IS THE RIGHT "WinMain" DECLARATION FOR THE GNUWIN32
COMPILER ?
:-)

Thank you all in advance,
     ___    ____    __    __
    /   |  / __ \   \ \  / /  
   / /| | | /  \_\   \ \/ /   
  / /_| | | | ___    / __ \   
 /  /|  | | \__/ |  / /  \ \  
/__/ |__|  \____/  /_/    \_\ 

makers of "Little Italy Linux", "AGX-Linux", "Linux User Profile" 
"Goblin" releas of AGX-Linux is under development
mailto:[email-masked]
http://www.geocities.com/SiliconValley/Bay/7305
Channel available if accessing with Netscape 4.x or better
>
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".