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]

R:Problem Compiling simple app


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:agx@usa.net
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
"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]