compiler nonsense

This forum is currently in read-only mode.
  • I'm doing some simple modifications to the sprite object to use in an editor I'm making for personal use.

    just going to add a variable or two, and some CallFunctions

    if I build without touching it

    it's fine

    I go into main, and add one thing after downloading and successfully building off of the cvs

    I add:

    int point;[/code:1wfrmqpu]
    to ExtObject
    
    and then I get crazy amounts of undeclared identifier errors when I build again
    
    if I delete that line 
    everything compiles fine
    why is it doing that?
    [code:1wfrmqpu]
    Drawing.cpp
    .\Drawing.cpp(38) : error C2064: term does not evaluate to a function taking 2 arguments
    .\Drawing.cpp(108) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    .\Drawing.cpp(108) : error C2146: syntax error : missing ';' before identifier 'hotspot'
    .\Drawing.cpp(108) : error C3861: 'hotspot': identifier not found
    .\Drawing.cpp(114) : error C2065: 'hotspot' : undeclared identifier
    .\Drawing.cpp(116) : error C2065: 'hotspot' : undeclared identifier
    .\Drawing.cpp(116) : error C2228: left of '.rotate_to_quad' must have class/struct/union
    .\Drawing.cpp(116) : error C2065: 'hotspot' : undeclared identifier
    .\Drawing.cpp(118) : error C2065: 'hotspot' : undeclared identifier
    .\Drawing.cpp(142) : error C2146: syntax error : missing ';' before identifier 'tex_scale'
    .\Drawing.cpp(142) : error C3861: 'tex_scale': identifier not found
    .\Drawing.cpp(143) : error C2146: syntax error : missing ';' before identifier 'object_scale_factor'
    .\Drawing.cpp(143) : error C3861: 'object_scale_factor': identifier not found
    .\Drawing.cpp(145) : error C2065: 'object_scale_factor' : undeclared identifier
    .\Drawing.cpp(145) : error C2228: left of '.x' must have class/struct/union
            type is ''unknown-type''
    .\Drawing.cpp(145) : error C2065: 'object_scale_factor' : undeclared identifier
    .\Drawing.cpp(145) : error C2228: left of '.y' must have class/struct/union
            type is ''unknown-type''
    .\Drawing.cpp(152) : error C2146: syntax error : missing ';' before identifier 'current_ratio'
    .\Drawing.cpp(152) : error C3861: 'current_ratio': identifier not found
    .\Drawing.cpp(153) : error C2146: syntax error : missing ';' before identifier 'p'
    .\Drawing.cpp(153) : error C2065: 'current_ratio' : undeclared identifier
    .\Drawing.cpp(153) : error C3861: 'p': identifier not found
    .\Drawing.cpp(154) : error C2065: 'p' : undeclared identifier
    .\Drawing.cpp(154) : error C2064: term does not evaluate to a function taking 2 arguments
    .\Drawing.cpp(154) : error C2065: 'object_scale_factor' : undeclared identifier
    .\Drawing.cpp(157) : error C2065: 'p' : undeclared identifier
    .\Drawing.cpp(157) : error C2228: left of '.rotate' must have class/struct/union
            type is ''unknown-type''
    .\Drawing.cpp(159) : error C2065: 'p' : undeclared identifier
    .\Drawing.cpp(159) : error C2228: left of '.x' must have class/struct/union
            type is ''unknown-type''
    .\Drawing.cpp(159) : error C2065: 'p' : undeclared identifier
    .\Drawing.cpp(159) : error C2228: left of '.y' must have class/struct/union
            type is ''unknown-type''
    .\Drawing.cpp(161) : error C2146: syntax error : missing ';' before identifier 'uv_offset'
    .\Drawing.cpp(161) : error C3861: 'uv_offset': identifier not found
    .\Drawing.cpp(162) : error C2146: syntax error : missing ';' before identifier 'uv'
    .\Drawing.cpp(162) : error C2065: 'current_ratio' : undeclared identifier
    .\Drawing.cpp(162) : error C2065: 'uv_offset' : undeclared identifier
    .\Drawing.cpp(162) : error C3861: 'uv': identifier not found
    .\Drawing.cpp(164) : error C2065: 'uv' : undeclared identifier
    .\Drawing.cpp(164) : error C2065: 'tex_scale' : undeclared identifier[/code:1wfrmqpu]
  • 'point' is the name of a class (an x,y coordinate) so it's probably complaining about a bad name, like trying to declare 'bool float'.

  • lol

    oh thanks ashley

    that makes sense.

    KPoint it is!

    EDIT: and yes, that fixed the problem

  • namespaces?

  • What?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not familiar with the SDK or the source, but the common C++ solution to avoid global name clashes are namespaces

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)