Cant. Compile. HELP.

  • dnerd
    24th Mar 2011 Member 0 Permalink
    that solved a bit of the problem, thanks, new error message:

    from src/elements/yest.c:1:
    includes/powder.h:691: error: ‘PT_LN2’ undeclared here (not in a function)
    includes/powder.h:703: error: expected expression before ‘static’
    make: *** [powder-x] Error 1

    from the "PT_LN2" that i got in the error message, i think the problem may have something to do with this state change code:


    /* NITG */ {IPL, NT, IPH, NT, 77.0f, PT_LN2, ITH, NT},
    /* DYNA */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT},
    /* OXYA */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT},


    Specifically line 1
  • boxmein
    24th Mar 2011 Former Staff 0 Permalink
    At powder.h row 691 there is PT_LN2 undeclared. #DEFINE it in powder.c
    At row 701 something must be before static.
  • dnerd
    24th Mar 2011 Member 0 Permalink
    @boxmein
    ok ill look for that...
  • jacksonmj
    24th Mar 2011 Developer 0 Permalink
    If you're aiming for liquid nitrogen, it's PT_LNTG, not PT_LN2
  • dnerd
    24th Mar 2011 Member 0 Permalink
    @boxmein
    its weird that LN2 would be undeclared, i only made it so it would change state to Nitrogen gas... (thats all i messed with it...)



    // change boiling point with pressure
    if ((ptypes[t].state==ST_LIQUID && ptransitions[t].tht>-1 && ptransitions[t].tht || t==PT_LNTG || t==PT_SLTW)
    ctemph -= 2.0f*pv[y/CELL][x/CELL];
    else if ((ptypes[t].state==ST_GAS && ptransitions[t].tlt>-1 && ptransitions[t].tlt || t==PT_WTRV)
    ctempl -= 2.0f*pv[y/CELL][x/CELL];
    s = 1;
    if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) {
    // particle type change due to high temperature


    Is that the part of powder.c where i define PT_LN2?
  • boxmein
    24th Mar 2011 Former Staff 0 Permalink
    @dnerd Defining is in powder.h, but I think you should use PT_LNTG throughout the code(unless you want to define like this: #define PT_LN2 PT_LNTG). The error showed that in powder.h(691) you used PT_LN2. Change that and you should be fine :)
  • dnerd
    24th Mar 2011 Member 0 Permalink
    @boxmein
    so instead of saying LN2 in the state transition code i should use PT_LNTG? easy fix (also, 1000nth post!)

    i fixed it and it gave me these errors:

    )
    src/main.c:2049: error: ‘tpt_console_pyc’ undeclared (first use in this function)
    src/main.c: At top level:
    src/main.c:3709: error: expected declaration specifiers or ‘...’ before ‘PyObject’
    src/main.c: In function ‘process_command’:
    src/main.c:3718: error: ‘PyObject’ undeclared (first use in this function)
    src/main.c:3718: error: ‘pvalue’ undeclared (first use in this function)
    src/main.c:3718: error: ‘pargs’ undeclared (first use in this function)
    src/main.c:3729: error: ‘pfunc’ undeclared (first use in this function)
    make: *** [powder-x] Error 1

    and quite a bit more
    also it gave me alot of these:

    src/main.c:1291: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
  • macweirdo
    24th Mar 2011 Member 0 Permalink
    Make a pastebin of all the errors, so we can pinpoint the wrongness.

    Also, converse with @cracker64 , he will help.

    The reason why it is failing is because of Python.
  • boxmein
    24th Mar 2011 Former Staff 0 Permalink
    These are PYconsole errors. Download python console package and use it with TPT.
  • dnerd
    24th Mar 2011 Member 0 Permalink

    macweirdo:


    The reason why it is failing is because of Python.


    well i see that
    @boxmein
    thanks ill do that.