error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top