Solved

BORLAND C++ 5.2

Posted on 1997-07-05
1
648 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

737 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