By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,402 Members | 1,099 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,402 IT Pros & Developers. It's quick & easy.

GUI compliation problem in borland

P: n/a
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::operator =(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>

Jul 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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/bi...UserInterfaces
Jul 22 '05 #2

P: n/a
In message <xD****************@newssvr15.news.prodigy.com>, Phlip
<ph*******@yahoo.com> 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
Jul 22 '05 #3

P: n/a
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::operator =(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

Jul 22 '05 #4

P: n/a
Richard Herring <ju**@[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.
Jul 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.