473,666 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

meaning of the error ?

Dear All

While building the the project,
I am geting the two errors at linking stage.

Can any help me out what these exactly means ??

Linking...
Creating library Debug/15JulyBulid.lib and object
Debug/15JulyBulid.exp
LIBCD.lib(crt0. obj) : error LNK2001: unresolved external symbol _main
Debug/15JulyBulid.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

15JulyBulid.exe - 2 error(s), 0 warning(s)

Thanks In Advance
Ranjeet

Nov 15 '05 #1
12 1614
ra***********@g mail.com wrote on 15/07/05 :

While building the the project,
I am geting the two errors at linking stage.

Can any help me out what these exactly means ??

Linking...
Creating library Debug/15JulyBulid.lib and object
Debug/15JulyBulid.exp
LIBCD.lib(crt0. obj) : error LNK2001: unresolved external symbol _main
Debug/15JulyBulid.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

15JulyBulid.exe - 2 error(s), 0 warning(s)


Sounds not to be a C-queston. More likely it's a compiler/linker issue.
You should read more carefully your compiler/linker manual about 'how
to make a library' or 'how to make an executable' depending what you
want to do exactly.

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"There are 10 types of people in the world today;
those that understand binary, and those that dont."

Nov 15 '05 #2
Ken
Hi Ranjeet,

Frankly, It's only one error.

I have a quesition. What type of application do you want to build?
executive or library?

It seems like you are building a library but you choosed wrong
application type.

Ken

Nov 15 '05 #3
ra***********@g mail.com writes:
LIBCD.lib(crt0. obj) : error LNK2001: unresolved external symbol _main


Your C program does not contain a function named main().
Every portable C program must.
--
Ben Pfaff
email: bl*@cs.stanford .edu
web: http://benpfaff.org
Nov 15 '05 #4
Groovy hepcat Ben Pfaff was jivin' on Sat, 16 Jul 2005 16:40:06 -0700
in comp.lang.c.
Re: meaning of the error ?'s a cool scene! Dig it!
ra***********@ gmail.com writes:
LIBCD.lib(crt0. obj) : error LNK2001: unresolved external symbol _main


Your C program does not contain a function named main().
Every portable C program must.


Every portable C program in a hosted environment, that is.

--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technicall y correct" English; but since when was rock & roll "technicall y correct"?
Nov 15 '05 #5
ph******@alphal ink.com.au.NO.S PAM (Peter "Shaggy" Haywood) writes:
Groovy hepcat Ben Pfaff was jivin' on Sat, 16 Jul 2005 16:40:06 -0700
ra*********** @gmail.com writes:
LIBCD.lib(crt0. obj) : error LNK2001: unresolved external symbol _main


Your C program does not contain a function named main().
Every portable C program must.


Every portable C program in a hosted environment, that is.


There are no portable C programs in freestanding environments.
For example, in a freestanding environment there is no way to
predict the name of the program startup function.
--
Ben Pfaff
email: bl*@cs.stanford .edu
web: http://benpfaff.org
Nov 15 '05 #6
i've tried to build some code which don't have a main function.
yes ,it proves u're right.
but i heard someone said that the c program sometimes can run without a
main function .then what is that?

Nov 15 '05 #7
In article <11************ **********@o13g 2000cwo.googleg roups.com>,
vire <Av*****@gmail. com> wrote:
i've tried to build some code which don't have a main function.
yes ,it proves u're right.
but i heard someone said that the c program sometimes can run without a
main function .then what is that?


Troll.

Nov 15 '05 #8
Ben Pfaff <bl*@cs.stanfor d.edu> wrote:
ra***********@g mail.com writes:
LIBCD.lib(crt0. obj) : error LNK2001: unresolved external symbol _main


Your C program does not contain a function named main().
Every portable C program must.


Really? I wonder, if a program doesn't have `main', is it UB, or CV?
Which rule is violated?

[always assuming hosted implelementatio n]

--
Stan Tobias
mailx `echo si***@FamOuS.Be dBuG.pAlS.INVALID | sed s/[[:upper:]]//g`
Nov 15 '05 #9
Le mardi 19 juillet 2005 à 08:57, vire a écrit dans comp.lang.c*:
i've tried to build some code which don't have a main function.
yes ,it proves u're right.
but i heard someone said that the c program sometimes can run without a
main function .then what is that?


The important word in Ben's answer was "portable".

Non-portable programs may run without a main() function if there is an
alternative in their environment (like WinMain() in Windows, for
instance).

Note: to answer properly with Google, don't click Reply, click Show
Options and then click the Reply that appears among those options.

--
___________ 19/07/2005 09:49:59
_/ _ \_`_`_`_) Serge PACCALIN -- sp ad mailclub.net
\ \_L_) Il faut donc que les hommes commencent
-'(__) par n'être pas fanatiques pour mériter
_/___(_) la tolérance. -- Voltaire, 1763
Nov 15 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2371
by: Roman Simkin | last post by:
Hi, As far as I know, a static variable is a variable that belongs to a function or a class (are there any other options?). I've seen somewhere a function that *returns* static types - something like: static someType myFunction() {...} What is the meaning of it?? Or did I get something wrong?
5
10397
by: Steve | last post by:
Hi; I went to the microsoft site to try to find a guide to the error messages that the jdbc drivers give ( for sqlserver 2000 ). I had no luck. Does anyone know if there is such a guide? I got this mysterious error message below in my logs ( nothing visible
3
1857
by: Alexander Farber | last post by:
Hi, does anyone have an idea, why do I get the following error (I have to use g++296 on RedHat Linux as compiler): In file included from r_dir.cpp:9: r_obey.h:262: declaration of `const AreaSet &CObeyFile::AreaSet () const' r_areaset.h:197: changes meaning of `AreaSet' from `class AreaSet'
5
7245
by: vilhelm.sjoberg | last post by:
Hello, I am a resonably confident C programmer, but not very sure about the dark corners of C++. Recently, I had G++ give me a strange error. The program in question is in essence: struct foo { };
388
21665
by: maniac | last post by:
Hey guys, I'm new here, just a simple question. I'm learning to Program in C, and I was recommended a book called, "Mastering C Pointers", just asking if any of you have read it, and if it's worth the $25USD. I'm just looking for a book on Pointers, because from what I've read it's one of the toughest topics to understand. thanks in advanced.
1
1363
by: mar-kav | last post by:
Hello, i'm a beginner so exuse me: i installed IIS 5.1, Framework1.1, vs .NET 2003 i put my web dir' in inetpub/wwwroot, tried to broows to my homepage under localhost & got this error message: Server Error in '/' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration
87
5111
by: Robert Seacord | last post by:
The SEI has published CMU/SEI-2006-TR-006 "Specifications for Managed Strings" and released a "proof-of-concept" implementation of the managed string library. The specification, source code for the library, and other resources related to managed strings are available for download from the CERT web site at: http://www.cert.org/secure-coding/managedstring.html
2
3089
by: Jimmy | last post by:
The following is apart of db2diag file. 2006-10-11-19.03.36.005000 Instance:DB2 Node:000 PID:3440(tomcat5.exe) TID:844 Appid:none oper system services sqloSSemClose Probe:20 Unexpected system error 0x6 has occurred. This has been mapped to ZRC 0x83000006. Who can tell me how to find the meaning of ZRC 0x83000006?
2
11002
by: excite | last post by:
I am trying to write a long string into a txt file, the string includes some backslash, looks like: 'd:\#########\#######\####### d:\######\####\####\### d:\###\###\' then I got a error saying 'EOL while scanning single-quoted string'. But it works when I just delete the last backslash or add one more backslash in the end. Can someone tell me what is the meaning of this error, and how to handle this problem? Thanks.
0
8448
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.