compiler nonsense

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Tue Jul 07, 2009 8:15 pm

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:
[code:1wfrmqpu]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]
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Jul 08, 2009 7:15 am

'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'.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Jul 08, 2009 7:15 am

lol
oh thanks ashley
that makes sense.
KPoint it is!

EDIT: and yes, that fixed the problem :mrgreen:
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Thu Jul 09, 2009 12:21 am

namespaces?
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Jul 09, 2009 10:10 pm

What?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Jul 09, 2009 10:18 pm

I'm not familiar with the SDK or the source, but the common C++ solution to avoid global name clashes are namespaces
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests