Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / error C2039: 'createSprite' : is not a member of 'AGK::agk'

Author
Message
ABlantzer
11
Years of Service
User Offline
Joined: 6th Aug 2012
Location:
Posted: 11th Sep 2012 18:56
Trying to compile my game, and getting the error above plus a host of similar ones. I think this has something to do with the fact that I put some of my functions in a separate file that is #included by the main program (for convenience).

Do I need to #include "agk.h" in every file of the program? Or what am I missing?
ABlantzer
11
Years of Service
User Offline
Joined: 6th Aug 2012
Location:
Posted: 11th Sep 2012 22:13
Never mind, figured it out! The problem was "createSprite" should've been capitalized to "CreateSprite". I was sloppy in writing the code.
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 11th Sep 2012 22:23
I assume your in t2 vs 2008 or 2010...

The only place I have #include "agk.h" at is the template.h file.

So I am assuming the is a linker error?
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 11th Sep 2012 22:29
If you put agk.h in the class creation file then you have to put it again in the main program file. You don't have to put it in the class implementation file because you already included the class name in the implementation.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Sep 2012 22:30
Technically agk::createSprite isn't a function declared in the agk scope however, agk::CreateSprite is (note the capital C).

Login to post a reply

Server time is: 2024-05-04 14:39:14
Your offset time is: 2024-05-04 14:39:14