469,602 Members | 1,747 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

Ive been working on this problem for a long time now and really need some help. I have a program in c++ code that gives me build errors and my program is having problems. I have two source files in my project and a header file. The header file(.h) contains the class, there is a main.cpp which contains the main part of the program and another .cpp file which contains the member functions of the class

My problem is that when i create a project and delete the .cpp file it creates for me and i insert the .cpp files into the source file and .h file into the header file and try to build my program. it gives me the following build error

Linking..
LIBCD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartu
Debug/Fract.exe : fatal error LNK1120: 1 unresolved external

Fract - 2 error(s), 0 warning(s

---------------------- Done ---------------------

Build: 0 succeeded, 1 failed, 0 skippe

Ive tried to get around this problem by copy and pasting the main.cpp into the .cpp file it creates for me but still the same error. I have also checked all the names and where the files are saved to make sure the program can find the files it needs but it still isnt working. All names are correct and still the same error. I feel like ive ran out of options and really need somebody's help! If somebody could help me out..
Im not sure if im doing something wrong when i create the project or if this is a problem in visual studio.Net 2003?
Can anybody help me out

I am willing to email somebody personally my code so that maybe YOU could check it out?
I know that the program works because i checked it on Metrowerks CodeWarrior without problem and i know that visual is different.

Nov 17 '05 #1
0 5042

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Sanjay Kumar | last post: by
1 post views Thread by developer | last post: by
1 post views Thread by eraserwars | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.