help, linker errors when adding library file to project

This is a discussion on help, linker errors when adding library file to project within the C++ Programming forums, part of the General Programming Boards category; I'm trying to create a game using Carnegie Mellon's graphics library, and would have been done days ago if not ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    help, linker errors when adding library file to project

    I'm trying to create a game using Carnegie Mellon's graphics library, and would have been done days ago if not for one problem:

    The game uses random numbers quite extensively in the game, so to generate those I'm using the standard deal (cstdlib and ctime included, rand() function with system clock as seed). It will compile, but when it goes to link, the following errors occur:

    Code:
    Linking...
    LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
    CMUgraphics.lib(auxil.obj) : error LNK2001: unresolved external symbol __imp__timeGetTime@0
    Debug/Simon.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.
    If anyone would be able to help me circumvent this, it would be greatly appriciated. Thanks in advance.

    ~ Lee

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,607
    I just downloaded the CMUgraphics example for VC++ 6.0 and this is what I had to do to make it compile.

    Menu->Projects->Settings->Link (tab)->Catagory: "Input" => in the "ignore libraries:" edit box, put "LIBC"

    If you aren't using the IDE, then do what the linker is telling you and use "/NODEFAULTLIB:LIBC".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  4. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  5. Linker errors with simple static library
    By Dang in forum Windows Programming
    Replies: 5
    Last Post: 09-08-2001, 09:38 AM

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