Link error LNK2001

  • tommig
    2nd Nov 2011 Member 0 Permalink
    Hi again,
    Just came across a link error when adding in a new element.
    I get an error which states:
    '1>air.obj : error LNK2001: unresolved external symbol _update_H2O2', and is repeated for all the object files.

    The code I have for the element so far is:
    Powder.h 261: #define PT_H2O2 161
    Powder.h 344: int update_H2O2(UPDATE_FUNC_ARGS);
    Powder.h 585: {"H2O2", PIXPACK(0xA5E5FA), 0.7f, 0.03f * CFDS, 0.89f, 1.00f, -0.1f, 0.4f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, 1, 32, SC_LIQUID, R_TEMP+0.0f +273.15f, 40, "Hydrogen Peroxide, oxidising agent",ST_NONE, TYPE_LIQUID, &update_H2O2},
    Powder.h 762: /* H2O2 */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT},

    and H2O2.c:
    #include

    int update_H2O2(UPDATE_FUNC_ARGS) {
    if(1>rand()%1000)
    if (1>rand()%2) create_part(i,x,y,PT_O2);
    else
    create_part(i,x,y,PT_WATR);

    return 0;
    }
    All assistance appriciated!
    Thanks
    Tommig
  • TheWiseEyes
    2nd Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • tommig
    2nd Nov 2011 Member 0 Permalink
    @TheWiseEyes (View Post)
    I tried, and it made it worse???
  • Jallibad
    2nd Nov 2011 Member 0 Permalink
    @tommig (View Post)
    if you're using visual studio, when you're adding a new .c file you have to do file/move and put it in your project.
  • tommig
    2nd Nov 2011 Member 0 Permalink
    @Jallibad (View Post)
    Damn! Forgot 'bout that!
  • cctvdude99
    2nd Nov 2011 Member 0 Permalink
    @tommig (View Post)
    We do have [code] tags, y'know... They allow you to keep indents, etc.
    Also, pastebin.
  • tommig
    2nd Nov 2011 Member 0 Permalink
    @cctvdude99 (View Post)
    How do you make those tags?
    And pastebin is blocked by the school internet
  • MasterMind555
    2nd Nov 2011 Member 0 Permalink
    @tommig (View Post)

    You write
    [ code]

    -Your Code-

    [/ code]