Newbie can't figure out linking error

This is a discussion on Newbie can't figure out linking error within the C Programming forums, part of the General Programming Boards category; Hi All My code compiles fine but then I get the following erro during the build - eventhough it says ...

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

    Question Newbie can't figure out linking error

    Hi All
    My code compiles fine but then I get the following erro during the build - eventhough it says "build complete" after.

    Code:
     Linking object C:\Documents and Settings\Adwa\My Documents\POS370\kudl+tax+calc+wk+3+dd.obj,,C:\Documents and Settings\Adwa\My Documents\POS370\kudl+tax+calc+wk+3+dd.map,c:\Program Files\Miracle C\ccl.lib ;
    file 'c:\documents and settings\adwa\my documents\pos370\kudl.obj' failed to open for read in linker
    Is it the capitalization? I didn't capitalize anything - my computer did (in it's naming of it's folders, etc.)

    Any advice will be appreciated

    Thanks.

  2. #2
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    First off, post some code. Secondly, get a bettter compiler - Miracle C isn't great. Popular ones would be code::blocks with MinGW or MS visual C++ Express.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    > Miracle C
    Well there's your problem!
    Miracle C is a piece of crap which costs $$$$
    Even trivial programs break it.

    Plus (and it's a biggie), nearly every other compiler out there wipes the floor with it.
    Also, there's a large number of really good compilers available for the huge sum of $0 (aka, free!).

    Try this one, it's quite popular
    http://www.codeblocks.org/
    Just make sure you get the larger package, which has the IDE AND Compiler. The smaller package is the IDE by itself.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    3
    um, thanks guys, but this is for a class and we are required to use Miracle C. If it won't work on Miracle C, then I haven't completed the assignment correctly.

    oh well...back to the drawing board.

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Drop the class and take one that uses a better compiler. No use in learning on a POS compiler.

  6. #6
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    It is very unfortunate that you are required to use that compiler, I can remember a number of instances where I found that it was not standards compliant in my early days of programming, which was confusing to say the least. I would encourage you to post your code, since it may be a simple issue there, and although I can't remember exactly how Miracle C's user interface worked, try creating a new project or file and building that.

    You might also want to tell the instructor responsible that there are many better alternatives to Miracle C out there. If he/she refuses to hear you out then you can be sure that they are a hack - no programmer of any meaningful experience would force the use of that compiler.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    Better get your tutor over here and we'll explain "the facts of life" to them.
    Are they getting kickbacks for recommending this crap?

    Bubba's right, drop the class. The tutor is a moron who can't tell the difference between C and a hole in the ground.

    Anyone who would actually be capable of teaching C just wouldn't care which compiler you used, just so long as it was ANSI.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Or if you don't for some reason feel that it's a good idea to drop the class, get yourself a better compiler, then once the program itself is working with a decent compiler (e.g. gcc using Code::Blocks as the IDE), it should be possible without TOO much hassle to make it work in Miracle C.

    I just looked at the web-site, and if the code displayed is indicative of the authors works, then I'm not at all surprised if it's failing at times. Calling malloc() as the first argument to strcpy() isn't very safe, as it will crash if malloc() failed to allocate memory!

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #9
    Registered User
    Join Date
    Aug 2008
    Posts
    3
    LOL! okay, thanks guys. I figured ou that my file name was too long - Miracle C can't handle it.

    In defense of my instructor - he has to use this because it is the one the school has sanctioned. He did say that we can use others, but whatever we write has to be able to run in Miracle C.

    LOL!! You all crack me up.

  10. #10
    Registered User
    Join Date
    Apr 2006
    Posts
    2,027
    Quote Originally Posted by Salem View Post
    Anyone who would actually be capable of teaching C just wouldn't care which compiler you used, just so long as it was ANSI.
    Unless of course they had an automated script that compiled submissions.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  2. file reading
    By gunghomiller in forum C++ Programming
    Replies: 9
    Last Post: 08-07-2007, 10:55 PM
  3. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 11:54 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

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