GUI compliation problem in borland

NathanAllen

Usenet Archive
Joined
Jul 22, 2004
Messages
1
Reaction score
0
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>
 

Phlip (3)

Usenet Archive
Joined
Dec 30, 2001
Messages
689
Reaction score
0
NathanAllen said:
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.
 

Richard Herring

Usenet Archive
Joined
Apr 8, 2004
Messages
926
Reaction score
0
Phlip said:
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.
 

Thomas Matthews

Usenet Archive
Joined
Nov 26, 2000
Messages
1,343
Reaction score
0
NathanAllen said:
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.
 

Christopher Benson-Manica

Usenet Archive
Joined
Jul 30, 2003
Messages
2,506
Reaction score
0
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,243
Members
248,133
Latest member
DujonT

Latest Threads

Top