Pb de makefile avec borland c++ compiler

Je viens d'installer borland c++ 5.5 compiler.

j'ai réalisé un prog windows de test qui ouvre une fenetre popup avec un text.

Si je compile et link à la ligne de commande, cela marche.

Si je réalise un makefile (avec les mêmes options), j'ai une erreur:
Error: Unresolved external '_main' referenced from C:\APPS\BCC55\LIB\C0X32.OBJ

je ne comprends le problème

Merci

2 réponses

  1. Rebonjour,
    ton appli est bien une appli windows et non pas une appli "console" ?

    J'ai pas bokou plus d'idée que Google sinon ... désolé.
      1. C'est vrai, s'il manque -tW comme option, lorsque tu compiles tu obtiens cette erreur.
        Seulement, j'ai mis cette option dans mon makefile.

        Ligne de commande , ça marche :
        bcc32 -tW -c -I"c:\apps\Bcc55\include" -L"c:\apps\Bcc55\lib" hellowin
        ilink32 -aa -L"c:\apps\Bcc55\lib" c0w32 hellowin.obj,hellowin,,import32 cw32,,

        Makefile, cela ne marche pas:
        BCB = c:\apps\bcc55
        PROG = hellowin

        INCLUDEPATH = "$(BCB)\include"
        LIBPATH = "$(BCB)\lib"

        # -------------------------------------------------------------------------
        CFLAGS = -tW -c
        LFLAGS = -aa

        # -------------------------------------------------------------------------
        ALLOBJ = c0x32.obj
        ALLLIB = import32.lib cw32.lib

        # -------------------------------------------------------------------------
        BCC32 = $(BCB)\bin\bcc32
        LINKER = $(BCB)\bin\ilink32

        #--------------------------------------------------------------------------
        ALL:
        $(LINKER) $(LFLAGS) -L$(LIBPATH) $(PROG).obj $(ALLOBJ),$(PROG),,$(ALLLIB),,

        # -------------------------------------------------------------------------
        $(PROG).obj:
        $(BCC32) $(CFLAGS) -I$(INCLUDEPATH) -L$(LIBPATH) $(PROG)