Solved

linking error

Posted on 2004-08-01
4
174 Views
Last Modified: 2013-11-08
I'm trying to compile a fortran program in Microsoft Developer Studio.  The code compiles, but I get the following error messages when I try to "build" the project:

--------------------Configuration: TCEbiofilm - Win32 Debug--------------------
Linking...
libcd.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/TCEbiofilm.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

TCEbiofilm.exe - 2 error(s), 0 warning(s)
------------------------------------------------------------------------------------------

Any help in solving this problem will be much appreciated
0
Comment
Question by:LeeClapp
4 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 11689903
This occurs generally when you try to create a Win32 console application but, you define main() function instead of WinMain().
Try to generate an empty console project:

File -> New -> Project -> Win32 Console Application, and the AppWizard will generate the proper main function. Cut and paste all your code and that's all!
0
 

Author Comment

by:LeeClapp
ID: 11689925
Thanks!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about problems I had with the new location API and permissions in Marshmallow
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.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

790 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