Cant. Compile. HELP.

  • dnerd
    24th Mar 2011 Member 0 Permalink
    I cant compile ANYTHING, not the mod i coded, not other peoples mods, not even the Unmodified Source Code!

    (Im on a Mac)

    I thought i might've forgotten to install the SDL, so i tried to install it and this happens:

    i type "tar xzf SDL-1.2.14.tar.gz" like the wiki says, and press return, this happens:

    tar: Error opening archive: Failed to open 'SDL-1.2.14.tar.gz': No such file or directory

    What exactly is going on??


    heres my coding, if it helps.

    {"NITG", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, -0.5f, 0.5f, 0.0005 * CFDS, 3, 0, 0, 0, 1, 1, 0.5, SC_GAS, R_TEMP+0.0f +273.15f, 100, "Nitrogen Gas", ST_GAS, TYPE_GAS, NULL},

    {"DYNA", PIXPACK(0x696969), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 750, 10, 0, 1, 1, 100, SC_EXPLOSIVE R_TEMP+0.0f +273.15f, 55, "Dynamite, very powerful explosive", ST_SOLID, TYPE_SOLID, NULL}

    {"OXYA", PIXPACK(0x00FF00), 0.5f, 0.02f * CFDS, 0.92f, 0.97f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 1, 1, 40, SC_EXPLOSIVE R_TEMP+0.0f +273.15f, 55, "Oxyacytacylene, hot burning fuel", ST_LIQUID, TYPE_LIQUID, NULL}


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

    Oxyacytacylene is not finished yet.
  • maxrocks329
    24th Mar 2011 Member 0 Permalink
    if it gives you the "no such file or dirctory", you either misspelled it, or it's not on the PATH variable. (i think, i'm new to c)
  • dnerd
    24th Mar 2011 Member 0 Permalink
    @maxrocks329
    im new to C too, what is the PATH variable?
  • maxrocks329
    24th Mar 2011 Member 0 Permalink
    it's where the compiler looks for the includes.
  • dnerd
    24th Mar 2011 Member 0 Permalink
    @maxrocks329
    ohh.. where is that located?

    also, signing off for the night, thanks for any help!
  • maxrocks329
    24th Mar 2011 Member 0 Permalink
    i said it wrong, PATH is a variable that says where the includes are, not where you put them. just read this (http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/) to change it.
  • vanquish349
    24th Mar 2011 Member 0 Permalink
    @dnerd
    your dynamite element will be exactly the same as c4 with that code
  • dnerd
    24th Mar 2011 Member 0 Permalink
    @vanquish349
    ill fix it.

    ok i managed to install the SDL (YAY!) but when i tried to compile my mod, i got this error:

    from src/elements/yest.c:1:
    includes/powder.h:526: error: expected ‘}’ before numeric constant
    includes/powder.h:527: error: expected ‘}’ before ‘{’ token
    includes/powder.h:691: error: ‘PT_LN2’ undeclared here (not in a function)
    includes/powder.h:703: error: expected expression before ‘static’

    many times, with different elements in place of YEST, i think there is something wrong with LN2 so ill check that out.

    i (thought) i fixed something, so i compiled and it gave me this:

    from src/elements/yest.c:1:
    includes/powder.h:526: error: expected ‘}’ before numeric constant
    includes/powder.h:527: error: initializer element is not computable at load time
    includes/powder.h:527: error: (near initialization for ‘ptypes[149].hconduct’)
    includes/powder.h:527: error: expected ‘}’ before numeric constant
    includes/powder.h:691: error: ‘PT_LN2’ undeclared here (not in a function)
    includes/powder.h:703: error: expected expression before ‘static’
  • ubuntupokemoninc
    24th Mar 2011 Member 0 Permalink
    something is not spaced right you probably have a simple syntax error, try compiling an original source code.
  • jacksonmj
    24th Mar 2011 Developer 0 Permalink
    @dnerd
    Looking at the first post, you are missing a comma after SC_EXPLOSIVE

    If that isn't the problem, posting some code might be helpful.