Frequent Mistake 7: error LNKxxxx: unresolved external symbolIf you get an unresolved symbol error without any other library than the A6 SDK, you forgot to add 'adll.lib' for a plugin or 'acknex.lib' for an engine project.
How-To-Add with Visual Studio 2005:
Open your project, Extras->Options, close the environment tab on the left side, open Projects and Project-Solutions (again on the left side), open VC++-Folders, then select 'Include directories' on the top left box. Now add the sdk_plugin or sdk_engine (e.g 'C:\Programme\Lite-C\sdk_plugin' or 'C:\Programme\Lite-C\sdk_engine') to the list. Select 'Lib directories' on the top left box and add the same folder again.
Note: Take a look at Frequent Mistake 10 for problems with the " __chr " symbolFrequent Mistake 8: I´m new to C++, how to start?First you need a compiler and an IDE. Popular compilers are Visual Studio, Dev C++, MinGW,... Search at Google how and where to get them, there are lot´s of freebies.
E.g
http://msdn.microsoft.com/vstudio/express/ (recommended)
http://www.bloodshed.net/devcpp.htmlNow you need to get to know C++. It´s hard, but worth learning it. Buy a book (for good one´s search here at the forum / depending on your language) or google for online tutorials. I advise you to buy a book, event if it costs your last penny. The quality is mostly much better, you can hack everywhere, even in the dessert and it takes you away from the desktop for some minutes, sparing your eyes.
Now play with your gained experience. Yes, you could just start with the SDK, but thats not really senseful. If you think you´ve done it, go on to mistake 9.
Frequent Mistake 9: I know C++, but not the SDKSo, you know C++ but don´t know how to use the SDK. Then go ahead, if not, go back to mistake 8. The steps of creating a working project (not compiler specific):
1. Create a new project
2.1 In your compiler, add the sdk_engine or sdk_plugin folder (located in your A6 directory) to the locations for headers and libs; This will keep the SDK files in 1 central location, making updates easier and preventing lots of duplicated files
2.2 If you have no clue how to do 2.1, just copy the files from the sdk_engine/sdk_plugin to your project folder and add them then to the project
3. Add acknex.lib (for engine projects) or adll.lib (for engine plugins) to your linker options
4. Create a main file (e.g. main.cpp), depends on your compiler and your preferences
5. Fill it with that code:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <math.h.>
// engine specific header file
#define DLL_USE // always define before including adll.h
#include "adll.h"
// DLL entry point
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
// make sure the library is linked
engine_bind();
return TRUE;
}
6. Compile your stuff; For possible errors search this thread
Edit:
- Changed the way the SDK is linked