Thread

MFC bot (Sdk)

MFC bot // Sdk

1  |  

pc wizard

Oct 14, 1998, 1:54pm
I was trying to make a dialog box program (GUI) bot program. It starts up
and you cilck a button to on a menu that opens another dialog box for the
bot. (The program was started with VC++ MFC appwizard). I added the aw.h
and aw.lib files and did an #include for them in the source file for the
dialog box for the bots but I get these errors when I try to compile (all I
did was add the include parts I havn;t put in any bot coding yet):

--------------------Configuration: wizardry - Win32
Release--------------------
Compiling...
BOTDlg.cpp
D:\DevStudio\MyProjects\wizardry\aw.lib(1) : error C2143: syntax error :
missing ';' before '!'
D:\DevStudio\MyProjects\wizardry\aw.lib(2) : error C2018: unknown character
'0x60'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0x12'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0x14'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xe0'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0x15'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xae'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2059: syntax error :
'bad suffix on number'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xb4'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xb4'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xf0'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xf0'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xb0'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xb0'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xbe'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xbe'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2513: 'int' :
decl-specifier is missing a declarator before '='
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2059: syntax error :
'|='
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xca'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xca'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0x8a'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0x8a'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xf6'
D:\DevStudio\MyProjects\wizardry\aw.lib(3) : error C2018: unknown character
'0xf6'
D:\DevStudio\MyProjects\wizardry\BOTDlg.cpp(41) : error C2143: syntax error
: missing ';' before '}'
D:\DevStudio\MyProjects\wizardry\BOTDlg.cpp(44) : error C2143: syntax error
: missing ';' before '}'
D:\DevStudio\MyProjects\wizardry\BOTDlg.cpp(44) : error C2143: syntax error
: missing ';' before '}'
Error executing cl.exe.

wizardry.exe - 27 error(s), 0 warning(s)

I havn't edited any of the source code for that part of my program (it's
going to be a 'muli-purpose' with other things besides AW Bots..) just added
#include "Aw.h"
#include "Aw.lib"

It works when I use it in a console app, but it doesn't work with the one
started with MFC AppWizard.... any ideas how to fix those errors?

PC Wizard (ICQ-537376)
wizardry at home.com
http://pcwizard.ml.org

roland vilett

Oct 14, 1998, 4:26pm
Don't #include "aw.lib". aw.lib is not a C header file, it is a binary file
which is why you are getting all those errors.

-Roland

[View Quote]

edward sumerfield

Oct 14, 1998, 10:51pm
Add the aw.lib to the Project linker settings. It will link your code with
the aw.lib code and spit out a single program.

C++ programming concepts:

Start with a source file and some include files.

.c includes .h files

the next step is compiling the source and h files into objects.

.obj files.

these files contain intermediate code. Not runnable.
The aw.lib file contains .obj files. Its like a zip with with no
compression. Just a convenient way to collect .obj files together.
the next stage is linking the obj and lib files into a single runnable
program.

.exe

thats it.

Edward Sumerfield.

[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn