Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 9:25
thierrypp18-Jan-06 9:25 
GeneralRe: Visual C++ and C programming Pin
David Crow18-Jan-06 9:58
David Crow18-Jan-06 9:58 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 10:07
thierrypp18-Jan-06 10:07 
GeneralRe: Visual C++ and C programming Pin
BadKarma18-Jan-06 10:35
BadKarma18-Jan-06 10:35 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 10:42
thierrypp18-Jan-06 10:42 
GeneralRe: Visual C++ and C programming Pin
Graham Bradshaw18-Jan-06 9:10
Graham Bradshaw18-Jan-06 9:10 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 9:16
thierrypp18-Jan-06 9:16 
GeneralRe: Visual C++ and C programming Pin
BadKarma18-Jan-06 9:54
BadKarma18-Jan-06 9:54 
hi,

when code compiled is with a c++ compiler the code needs to be c++ compiler compatible.
C code is almost 90% compliant to c++ code, but there are some distinct issues that one must
know off.
thierrypp wrote:
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main


this error means that the compiler didn't find the main entry point of your code.
you did write
#include <something>

main()
{

you did forget to add a return value for your main function. Some C compilers automatically asume that you meant to write int main(void) but most C++ compilers don't do this automatic translation. Thats way the function main didn't compile hence there is no function to link too -> Unresolved external

The rest of the code looks fine.



codito ergo sum
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 9:58
thierrypp18-Jan-06 9:58 
GeneralRe: Visual C++ and C programming Pin
BadKarma18-Jan-06 10:07
BadKarma18-Jan-06 10:07 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 10:20
thierrypp18-Jan-06 10:20 
GeneralRe: Visual C++ and C programming Pin
David Crow18-Jan-06 10:04
David Crow18-Jan-06 10:04 
GeneralRe: Visual C++ and C programming Pin
BadKarma18-Jan-06 10:17
BadKarma18-Jan-06 10:17 
GeneralRe: Visual C++ and C programming Pin
Graham Bradshaw18-Jan-06 12:15
Graham Bradshaw18-Jan-06 12:15 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 12:34
thierrypp18-Jan-06 12:34 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 12:43
thierrypp18-Jan-06 12:43 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 9:48
thierrypp18-Jan-06 9:48 
AnswerRe: Visual C++ and C programming Pin
Rage19-Jan-06 0:04
professionalRage19-Jan-06 0:04 
GeneralRe: Visual C++ and C programming Pin
thierrypp19-Jan-06 3:44
thierrypp19-Jan-06 3:44 
GeneralRe: Visual C++ and C programming Pin
Shraddhan22-Jan-06 19:22
Shraddhan22-Jan-06 19:22 
GeneralRe: Visual C++ and C programming Pin
Shraddhan22-Jan-06 19:28
Shraddhan22-Jan-06 19:28 
QuestionMFC GUI Pin
greendays_0118-Jan-06 7:36
greendays_0118-Jan-06 7:36 
AnswerRe: MFC GUI Pin
paragdoshi18-Jan-06 7:52
paragdoshi18-Jan-06 7:52 
AnswerRe: MFC GUI Pin
FarPointer18-Jan-06 8:01
FarPointer18-Jan-06 8:01 
GeneralRe: MFC GUI Pin
greendays_0118-Jan-06 8:18
greendays_0118-Jan-06 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.