Hello everyone.
I am trying to create a very simple console c++ app to eventually run pawn scripts.
I #include "amx.h" #include "amxaux.h"
and add the directory "C:\Program Files (x86)\Pawn\source\amx" to my include path.. This works fine, as I can now see the functions and whatnot in the intellisense and build my project.
Next, I add the directory "C:\Program Files (x86)\Pawn\source\amxdll" to my project,
and then #pragma comment(lib, "amx32m.lib").
Here is my code.
#include <iostream>
#include <stdlib.h>
#include "amx.h"
#include "amxaux.h"
using namespace std;
#pragma comment(lib, "amx32m.lib")
int main(int argc, char* argv[])
{
// Step 1 create the virtual machine.
extern AMX_NATIVE_INFO console_Natives[];
extern AMX_NATIVE_INFO core_Natives[];
AMX amx;
cell ret = 0;
int err;
if (argc != 2)
cout << argv[0];
// ** I get a linker error when I uncomment this next line **
//err = aux_LoadProgram(&amx, argv[1], NULL);
return 0;
}
When I try to call aux_LoadProgram I get an error LNK2019: unresolved external symbol.
I do not understand what I am doing wrong some please assist me!
Thank you so much in advance