Solved

BORLAND C++ 5.2

Posted on 1997-07-05
1
646 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Title # Comments Views Activity
How to convert MFC APP to Win32 APP. 19 97
c++ syntax question 9 52
VS2015 Redefinition errors 4 72
Autosar OS Multicore Share Resources confusion ? 2 73
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

830 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