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 / AGK Tier 2: error C3861: 'memset': identifier not found

Author
Message
ABlantzer
11
Years of Service
User Offline
Joined: 6th Aug 2012
Location:
Posted: 10th Sep 2012 20:29
Hi,
I'm trying to convert a program I wrote in AppGameKit Tier 1 to work in Tier 2 using Microsoft VC++. As of right now, when I try to build, I get a bunch of errors from the libraries (not my code, but the code provided with AGK). Here's a partial list:

1>c:\agk\project1\csprite.h(53): error C3861: 'memset': identifier not found
1>c:\agk\project1\csprite.h(54): error C3861: 'memcpy': identifier not found
1>c:\agk\project1\csprite.h(284): error C2061: syntax error : identifier 'GLfloat'
1>c:\agk\project1\csprite.h(285): error C2061: syntax error : identifier 'GLfloat'
1>c:\agk\project1\csprite.h(288): error C2061: syntax error : identifier 'GLfloat'
1>c:\agk\project1\ctext.h(52): error C2143: syntax error : missing ';' before '*'
1>c:\agk\project1\ctext.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\ctext.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\ctext.h(53): error C2143: syntax error : missing ';' before '*'
1>c:\agk\project1\ctext.h(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\ctext.h(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\ctext.h(54): error C2143: syntax error : missing ';' before '*'
1>c:\agk\project1\ctext.h(54): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\ctext.h(54): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\cspritemgr.h(171): error C2143: syntax error : missing ';' before '*'
1>c:\agk\project1\cspritemgr.h(171): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\cspritemgr.h(171): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\cspritemgr.h(172): error C2143: syntax error : missing ';' before '*'
1>c:\agk\project1\cspritemgr.h(172): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\cspritemgr.h(172): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\cspritemgr.h(173): error C2143: syntax error : missing ';' before '*'
1>c:\agk\project1\cspritemgr.h(173): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\agk\project1\cspritemgr.h(173): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

I'm stumped, and I'm sure I'm missing something super-simple. Does anybody have any ideas?
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Sep 2012 00:36
Which version of VS are you using?

If I had to guess, VS can't find the AGKWindows.lib which means it hasn't been linked correctly. Check your Linker settings, Additional Library Dependencies. If it doesn't appear there then you'll have to go browsing for it. You should be able to find it in AGK\IDE]\platform\Windows\Lib\

Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 11th Sep 2012 01:52
If the compiler can't find the memset function, he has a bigger problem. That's a core C function, not something AppGameKit implements.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Sep 2012 04:20
Quote: "If the compiler can't find the memset function, he has a bigger problem. That's a core C function, not something AppGameKit implements."

Good point! All of the headers included via the core.cpp and template.cpp should cover everything so he could be missing one of those files. I didn't have to include anything extra when setting up the templates.

@ABlantzer, are you using the templates or creating a project from scratch?

ABlantzer
11
Years of Service
User Offline
Joined: 6th Aug 2012
Location:
Posted: 11th Sep 2012 06:24
I created an "empty project" and added files to it.

Most of my experience is in Perl, PHP and other scripting languages, so I'm really new to setting up a compiler (it's been many, many years since I did anything with C, and that was in school).

Would anybody have a link to a tutorial on how to properly configure a project in VS? (Btw, I use VS 2010 Express)
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Sep 2012 12:18
Quote: "I created an "empty project" and added files to it."

That would be it.

Quote: "Would anybody have a link to a tutorial on how to properly configure a project in VS? (Btw, I use VS 2010 Express)"

Right here. Third video down.

ABlantzer
11
Years of Service
User Offline
Joined: 6th Aug 2012
Location:
Posted: 11th Sep 2012 18:48
Thanks! For noobs like myself reading this thread in the future, here's how I fixed the issue: AppGameKit comes with templates for Visual Studio. They're in Program Files (x86) -> AppGameKit -> IDE -> templates. What I did was make a copy of the template in My Documents, rename it to the name of my project, and then open that up in VS and proceed to add my code to template.cpp.

There's probably a better way to do this, but it worked.

I'm still having issues right now, but I think that's a problem with my code, not anything in the setup.
7RS
11
Years of Service
User Offline
Joined: 10th May 2012
Location:
Posted: 12th Sep 2012 16:43
Everyone i think do like this, i always use to copy the template and change it for a new project.

Login to post a reply

Server time is: 2024-05-01 04:21:10
Your offset time is: 2024-05-01 04:21:10