GUI compliation problem in borland

Discussion in 'C++' started by NathanAllen, Jul 23, 2004.

  1. NathanAllen

    NathanAllen Guest

    First of all to let you know I am using the following compiler:
    Borland C++Builder 5.5.1 with Turbo Incremental Link 5.00

    When I tried to make my first GUI drawing following Lawernceville Press's
    book it created an error in the compliation process:
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland

    E:\Gui.cpp:
    Warning W8004 E:\borland\Include\lvp\String.cpp 106: 'len' is assigned a
    value that is never used in function String::eek:perator =(const char *)
    Warning W8057 E:\Gui.cpp 23: Parameter 'x' is never used in function
    GuiClass::GuiMouseClick(int,int)
    Warning W8057 E:\Gui.cpp 23: Parameter 'y' is never used in function
    GuiClass::GuiMouseClick(int,int)
    Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    Error: Unresolved external '_main' referenced from
    E:\BORLAND\LIB\C0X32.OBJ

    The warnings are no problem but the error stops the process and I can't
    get an executable.

    Here is the program code it's pretty simple:

    #include <lvp\gui_top.h>

    class GuiClass {
    public:
    GuiClass();
    void GuiMouseClick(int x,int y);
    void GuiPaint();
    String Title();
    private:
    };

    GuiClass::GuiClass()
    {
    }

    String GuiClass::Title()
    {
    return("A mimimal Gui Program");
    }

    void GuiClass::GuiMouseClick(int x,int y)
    {
    }

    void GuiClass::GuiPaint()
    {
    Circle(180,200,50);
    Circle(250,200,50);
    Circle(320,200,50);
    Circle(215,270,50);
    Circle(285,270,50);
    }

    #include <lvp\gui_bot.h>
    NathanAllen, Jul 23, 2004
    #1
    1. Advertising

  2. NathanAllen

    Phlip Guest

    NathanAllen wrote:

    > Error: Unresolved external '_main' referenced from
    > E:\BORLAND\LIB\C0X32.OBJ


    Prep any question to a newsgroup by searching for its details on
    http://groups.google.com first. You might answer the question, and you might
    learn the newsgroups where it's on topic. This newsgroup is not qualified to
    answer questions about programs that don't start with main(), because we try
    to be platform-neutral here.

    --
    Phlip
    http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
    Phlip, Jul 23, 2004
    #2
    1. Advertising

  3. In message <xD0Mc.2706$>, Phlip
    <> writes
    >NathanAllen wrote:
    >
    >> Error: Unresolved external '_main' referenced from
    >> E:\BORLAND\LIB\C0X32.OBJ

    >
    >Prep any question to a newsgroup by searching for its details on
    >http://groups.google.com first. You might answer the question, and you might
    >learn the newsgroups where it's on topic. This newsgroup is not qualified to
    >answer questions about programs that don't start with main(), because we try
    >to be platform-neutral here.


    His program _does_ start with main (or rather it doesn't, and that's the
    problem.) The underscore is just linker decoration which appears in the
    error message. His problem's simple enough - main() isn't defined.

    --
    Richard Herring
    Richard Herring, Jul 23, 2004
    #3
  4. NathanAllen wrote:

    > First of all to let you know I am using the following compiler:
    > Borland C++Builder 5.5.1 with Turbo Incremental Link 5.00
    >
    > When I tried to make my first GUI drawing following Lawernceville Press's
    > book it created an error in the compliation process:
    > Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    >
    > E:\Gui.cpp:
    > Warning W8004 E:\borland\Include\lvp\String.cpp 106: 'len' is assigned a
    > value that is never used in function String::eek:perator =(const char *)
    > Warning W8057 E:\Gui.cpp 23: Parameter 'x' is never used in function
    > GuiClass::GuiMouseClick(int,int)
    > Warning W8057 E:\Gui.cpp 23: Parameter 'y' is never used in function
    > GuiClass::GuiMouseClick(int,int)
    > Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    > Error: Unresolved external '_main' referenced from
    > E:\BORLAND\LIB\C0X32.OBJ
    >
    > The warnings are no problem but the error stops the process and I can't
    > get an executable.
    >
    > Here is the program code it's pretty simple:
    >
    > #include <lvp\gui_top.h>
    >
    > class GuiClass {
    > public:
    > GuiClass();
    > void GuiMouseClick(int x,int y);
    > void GuiPaint();
    > String Title();
    > private:
    > };
    >
    > GuiClass::GuiClass()
    > {
    > }
    >
    > String GuiClass::Title()
    > {
    > return("A mimimal Gui Program");
    > }
    >
    > void GuiClass::GuiMouseClick(int x,int y)
    > {
    > }
    >
    > void GuiClass::GuiPaint()
    > {
    > Circle(180,200,50);
    > Circle(250,200,50);
    > Circle(320,200,50);
    > Circle(215,270,50);
    > Circle(285,270,50);
    > }
    >
    > #include <lvp\gui_bot.h>
    >


    The above is just a class and its methods.
    You need to write a program that exercises the
    above class and its methods.


    --
    Thomas Matthews

    C++ newsgroup welcome message:
    http://www.slack.net/~shiva/welcome.txt
    C++ Faq: http://www.parashift.com/c -faq-lite
    C Faq: http://www.eskimo.com/~scs/c-faq/top.html
    alt.comp.lang.learn.c-c++ faq:
    http://www.raos.demon.uk/acllc-c /faq.html
    Other sites:
    http://www.josuttis.com -- C++ STL Library book
    Thomas Matthews, Jul 23, 2004
    #4
  5. Richard Herring <junk@[127.0.0.1]> spoke thus:

    >>> Error: Unresolved external '_main' referenced from
    >>> E:\BORLAND\LIB\C0X32.OBJ


    > His program _does_ start with main (or rather it doesn't, and that's the
    > problem.) The underscore is just linker decoration which appears in the
    > error message. His problem's simple enough - main() isn't defined.


    <ot degree="severe">Actually, his *real* problem is likely that he's
    trying to use 5.5.1 to compile an application that expects to have all
    Borland's GUI crap available. In any case, if he's compiling a GUI
    application, he needs to define WinMain and not main, and link against
    C0W32.obj.</ot>

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
    Christopher Benson-Manica, Jul 24, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack Wright

    ASP .Net compliation

    Jack Wright, Jan 27, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    1,704
    Alvin Bruney [MVP]
    Jan 28, 2004
  2. dollar

    compliation error

    dollar, Jul 6, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    461
    dollar
    Jul 6, 2005
  3. Replies:
    12
    Views:
    477
    Marcus Kwok
    Apr 5, 2006
  4. Replies:
    1
    Views:
    1,110
    SuperKoko
    Oct 2, 2006
  5. multics.cn

    a compliation error

    multics.cn, Nov 9, 2007, in forum: C++
    Replies:
    7
    Views:
    399
    James Kanze
    Nov 9, 2007
Loading...

Share This Page