Thread: Unresovled external error...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    3

    Unresovled external error...

    Ugh, i know you guys probably get people with this problem all the time. I know. I've been searching through the forums to see if anyone's had the same problem as i have. Everyone has had it before, but all the solutions that i saw suggested don't work with me.

    Now, i'm not a big programming geek. I originally thought i was, and i was going to major in Computer Science, but i'm now changing that to another major. Anyway, i don't know a whole lot. I know enough to get around, but that's it. Anyway, i'm trying to do a programming project for this class. We haven't gone over any sort of graphical programming yet, but our project involves Conway's Game Of Life. All the graphical stuff is already included, so all's we gotta do supply the code that runs the game.

    It supposedly runs on OpenGL. Now, i'm pretty sure i've got everything figured out so far. I whittled down all the errors until i had none left. Then i hit F5 and got an external error. Here's the exact code:

    Code:
    life.obj : error LNK2001: unresolved external symbol "void __cdecl display(void)" (?display@@YAXXZ)
    I've tried everything. I've tried including other files, creating it as a Win application....i'm not sure what's wrong. One thing i think it might be is a function declaration. In the main function, there's a line that reads "glutMainLoop();", and in class i was told it leads to a function called "void display". I have no idea how this works, and when i was given a skeleton program, it ran fine (though it did nothing). What's up?

    Sorry for the length of this post

  2. #2
    Registered User
    Join Date
    Nov 2003
    Posts
    3
    well, i finally figured it out.

    My program actually runs now...but the "Game of Life" window doesn't display anything. I think that my computer runs too fast for me to do anything; the seed file runs its course and dies before i can see anything. I doubt it though...i think the seed file i'm loading eventually degrades into a loop. Can anyone help me? How can i slow down the drawing loop?

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    You can use Sleep(unsigned miliseconds), it's in windows.h...
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #4
    Amateur
    Join Date
    Sep 2003
    Posts
    228
    Or you can use one of the counters if you want to be more exact. For instance, you can use QueryPerformanceCounter from windows.h as well.

  5. #5
    Registered User
    Join Date
    Nov 2003
    Posts
    3
    thanks, i'll try and use those.

    figured out my problem...i wasn't even reading the seed file right.

    It's composed of periods and zeroes, like this:

    Code:
    5 5
    00.00
    0...0
    0...0
    0...0
    00.00
    The first two numbers denote the number of rows and columns. My question is, what is the best way to read each individual character? I can't remember how to do it with getline.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  2. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM