Help! Compil error in source code!

Discussion in 'C' started by grechko, Jun 7, 2010.

  1. grechko

    grechko New Member

    Joined:
    Jun 7, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I have source code in C. In compilling have errors:

    Warning 1 warning C4244: '=' : conversion from 'u32' to 'u8', possible loss of data c:\users\eniac\desktop\hash-ciphers\hash-ciphers\daginda\daginda.cpp 122 1 daginda
    Warning 2 warning C4101: 'temp1' : unreferenced local variable c:\users\eniac\desktop\hash-ciphers\hash-ciphers\daginda\daginda.cpp 295 1 daginda
    Warning 3 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\eniac\desktop\hash-ciphers\hash-ciphers\daginda\daginda.cpp 454 1 daginda
    Error 4 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup C:\Users\eniac\Desktop\hash-ciphers\hash-ciphers\DAGINDA\MSVCRTD.lib(crtexe.obj) daginda
    Error 5 error LNK1120: 1 unresolved externals C:\Users\eniac\Desktop\hash-ciphers\hash-ciphers\DAGINDA\Debug\daginda.exe daginda

    source code: View attachment DAGINDA.zip
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    With main missing it appears you've built the program as the wrong kind of project. main() starts a command line program, so did you try to build it as a Windows program (which must start with WinMain)?

    To build a command line project, go to File -> New -> Project; in Visual C++ select Win32; in Templates pick Win32 Console Application. At the appropriate point switch precompiled headers off. Then add daginda.cpp to the project and comment out the existing tmain function, and it should build OK.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice