Jump to content

[error]compile


Guest ascent

Recommended Posts

REV 10409
SD2

for unit.h

Unit *GetMisdirectionTarget() { return m_misdirectionTargetGUID ? GetMap()->GetUnit(m_misdirectionTargetGUID) : NULL; }

Error

6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2027: undefined type 'Map' and (a) was used. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Object.h (73): 'Map' to see the declaration. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2227: '-> GetUnit' left the class / struct / union / generic type point must. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2027: undefined type 'Map' and (a) was used. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Object.h (73): 'Map' to see the declaration. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2227: '-> GetUnit' left the class / struct / union / generic type point must. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2027: undefined type 'Map' and (a) was used. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Object.h (73): 'Map' to see the declaration. 
6> c: \\ users \\ administrator \\ desktop \\ server \\ saekoeo \\ mangos \\ src \\ game \\ Unit.h (1921): error C2227: '-> GetUnit' left the class / struct / union / generic type point must.

how can fix? that? so what do i change?

Link to comment
Share on other sites

And this will most wrong way from possible.

Remember simple thing: never never add new includes to .h file if you not 100% sure that this correct and will not add unexpected results.

In C/C++ very easy get cyclic header dependences with very unclear error messages.

Alswasy instead if possible use forward class/structure declarations.

Link to comment
Share on other sites

And this will most wrong way from possible.

Remember simple thing: never never add new includes to .h file if you not 100% sure that this correct and will not add unexpected results.

In C/C++ very easy get cyclic header dependences with very unclear error messages.

Alswasy instead if possible use forward class/structure declarations.

copy that ^^;;

thx ur advice

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use