Solved

BORLAND C++ 5.2

Posted on 1997-07-05
1
642 Views
Last Modified: 2012-06-22
I have a problem, when I try to compile a file, he saysError: Unresolved external '_main' referenced from H:\BC52\LIB\C0X32.OBJ(H: is my HDD)Can you help me ?
0
Comment
Question by:devil_
1 Comment
 
LVL 2

Accepted Solution

by:
sprinkmeier earned 40 total points
ID: 1164294
Disclaimer: I'm guessing!
The compiler thinks that you are trying to compile a program (as opposed to a library or DLL or somehting) and is looking for your main.
(H:\BC52\LIB\C0X32.OBJ contains that startup code that sets up argc and argv and then calls int main(int argc, char ** argv))

So,
a: Tell your compiler not to expect a main (option /C on command line for Compile only, no linking)
b: make sure your main is recognised. As far as I know, main has to be one of

int main()
int main(int argc, char ** argc)
int main(int argc, char ** argc, char ** envp)
(envp gives you the environment variables, NOT SUPPORTED EVERYWHERE!)

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question