need help on....linking error in C prog!!

This is a discussion on need help on....linking error in C prog!! within the C Programming forums, part of the General Programming Boards category; I am working in XP, Visual C++ v6 doing maintenance on existing report preparing codes. I am new to C++ ...

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    8

    need help on....linking error in C prog!!

    I am working in XP, Visual C++ v6 doing maintenance on existing report preparing codes. I am new to C++ language and to C/C++ programming. I have a linking error and would appreciate some expert help.


    error mssges:
    :\Documents and Settings\IVarma\Desktop\kunda\Modcode.cpp(916) : warning C4508: 'main' : function should return a value; 'void' return type assumed
    Linking...
    Modcode.obj : error LNK2001: unresolved external symbol "int __cdecl open_cluster(void)" (?open_cluster@@YAHXZ)
    Modcode.obj : error LNK2001: unresolved external symbol _BTRV@24
    Modcode.obj : error LNK2001: unresolved external symbol "char * dbpath" (?dbpath@@3PADA)
    Modcode.obj : error LNK2001: unresolved external symbol _fatal
    Modcode.obj : error LNK2001: unresolved external symbol _set_multi_defaults
    Modcode.obj : error LNK2001: unresolved external symbol "char * __cdecl get_option(void)" (?get_option@@YAPADXZ)
    Modcode.obj : error LNK2001: unresolved external symbol "int __cdecl new_decode_cluster(char *,char (* const)[4][100])" (?new_decode_cluster@@YAHPADQAY13GE@D@Z)
    Debug/Modcode.exe : fatal error LNK1120: 7 unresolved externals
    Error executing link.exe.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Well I meant that the moderators should move it, not that you should double-post.

    mods: need help to resolve the C# bug!!
    Last edited by robwhit; 09-08-2008 at 08:24 PM.

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    8
    oks...sorry!
    for that.......

    but its a totally C program and i was compiling it through the VC++ only...so i just put its name as .Cpp.

    is there any prblm with puting its name as *.cpp.

    if not pls suggest me ....the solution for it1


    thanx

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    .cpp is for C++ files. .c is for C files. Just rename it and it should compile as C instead of C++.

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    8
    yep!...i did it, but problem persists still.......................

    can u suggest me any setting change or something else by lukin at the error mssg only!!!!??


  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    I don't recognize those function names, but presumably they come from some library. You need to link the library when creating an executable.

  7. #7
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,641
    Quote Originally Posted by robwhit View Post
    Well I meant that the moderators should move it, not that you should double-post.

    mods: need help to resolve the C# bug!!
    And it's cross-posted here as well.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems linking with g++
    By Just in forum Linux Programming
    Replies: 11
    Last Post: 07-24-2006, 01:35 AM
  2. strange linking error -- can not find shared library
    By George2 in forum C Programming
    Replies: 2
    Last Post: 07-10-2006, 10:51 PM
  3. Replies: 8
    Last Post: 04-27-2006, 10:39 AM
  4. Grrr.... SDL Linking Problem
    By 7EVEN in forum Game Programming
    Replies: 5
    Last Post: 08-12-2005, 08:44 PM
  5. Linking error with DirectDrawCreateEx
    By jjj93421 in forum Game Programming
    Replies: 6
    Last Post: 04-06-2004, 03:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21