Solved

BORLAND C++ 5.2

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now