fungus // User Search

fungus // User Search

1  |  

Getting Started with SDK

Jan 10, 1999, 3:54pm
Okay, here's a real simple question for you guys:

I'm just trying to get the example sdk greeterbot up and running under
VC++. When I try to build I get error message: unable to open file
aw.lib. I have the aw.dll, aw.lib and greeterbot source all attached to
the project, so what's the problem?

I'd be the first to admit that the problem is probably my lack of
understanding of how to use the program in the 1st place, bu if you
could set me straight it'd give me a starting point to work from :-)

Getting Started with SDK

Jan 10, 1999, 9:57pm
Hmm, perhaps I should post some more details too:

Info :Building...
Info :Compiling D:\bots\funbot.cpp
Warn : funbot.cpp(19,11):Possibly incorrect assignment
Warn : funbot.cpp(28,11):Possibly incorrect assignment
Warn : funbot.cpp(38,11):Possibly incorrect assignment
Warn : funbot.cpp(44,11):Possibly incorrect assignment
Warn : funbot.cpp(53,11):Possibly incorrect assignment
Info :Linking D:\bots\second.exe
Error: Error: Unresolved external '_aw_init' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_event_set' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_create' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_string_set' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_login' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_enter' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_int_set' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_state_change' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_wait' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_destroy' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_term' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_say' referenced from
D:\BOTS\FUNBOT.OBJ
Error: Error: Unresolved external '_aw_string' referenced from
D:\BOTS\FUNBOT.OBJ

of source:

#include "aw.h"
#include <stdio.h>
#include <stdlib.h>

void handle_avatar_add (void);

main (int argc, char *argv[])
{

int rc;

/* check command line */
if (argc < 3) {
printf ("Usage: %s number password\n", argv[0]);
exit (1);
}

/* initialize Active Worlds API */
if (rc = aw_init (AW_BUILD)) {
printf ("Unable to initialize API (reason %d)\n", rc);
exit (1);
}

/* install handler for avatar_add event */
aw_event_set (AW_EVENT_AVATAR_ADD, handle_avatar_add);

/* create bot instance */
if (rc = aw_create (0, 0, 0)) {
printf ("Unable to create bot instance (reason %d)\n", rc);
exit (1);
}

/* log bot into the universe */
aw_int_set (AW_LOGIN_OWNER, atoi (argv[1]));
aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, argv[2]);
aw_string_set (AW_LOGIN_APPLICATION, "SDK Sample Application #1");
aw_string_set (AW_LOGIN_NAME, "GreeterBot");
if (rc = aw_login ()) {
printf ("Unable to login (reason %d)\n", rc);
exit (1);
}

/* log bot into the world called "beta" */
if (rc = aw_enter ("Beta", 0)) {
printf ("Unable to enter world (reason %d)\n", rc);
exit (1);
}

/* announce our position in the world */
aw_int_set (AW_MY_X, 1000); /* 1W */
aw_int_set (AW_MY_Z, 1000); /* 1N */
aw_int_set (AW_MY_YAW, 2250); /* face towards GZ */
if (rc = aw_state_change ()) {
printf ("Unable to change state (reason %d)\n", rc);
exit (1);
}

/* main event loop */
while (!aw_wait (-1))
;

/* close everything down */
aw_destroy ();
aw_term ();
return 0;

}

void handle_avatar_add (void)
{

char message[100];

sprintf (message, "Hello %s", aw_string (AW_AVATAR_NAME));
aw_say (message);
/* log the event to the console */
printf ("avatar_add: %s\n", aw_string (AW_AVATAR_NAME));

}

[View Quote] > Okay, here's a real simple question for you guys:
>
> I'm just trying to get the example sdk greeterbot up and running under
> VC++. When I try to build I get error message: unable to open file
> aw.lib. I have the aw.dll, aw.lib and greeterbot source all attached to
> the project, so what's the problem?
>
> I'd be the first to admit that the problem is probably my lack of
> understanding of how to use the program in the 1st place, bu if you
> could set me straight it'd give me a starting point to work from :-)

Getting Started with SDK

Jan 11, 1999, 6:49pm
okay, (now I've actually read the manual that came with C++) so hopefully I
can ask this question more meaningfully ;-)

- Um, it's not VC++ but Borland C++

- It looks like I can compile everything just fine, apart from
- if I just try to create an .exe, with my bot.cpp file linking to
aw.h no problems
and no other files in the project I get Unresolved external
'_aw_XXXXX'
errors. I'm guessing that's because I haven't linked in aw.lib
properly.
- If I link the aw.lib file to the .exe I get Error:
'D:\BOTS\AW.LIB' contains
invalid OMF record, type 0x21

Thanks for the advice Edward and Faber (no, it isn't fixed :( but the
idiots introduction to C++ was very helpful, unlike the manuals)

Getting Started with SDK

Jan 11, 1999, 8:48pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#C0C0C0" link="#993366" vlink="#CC66CC" alink="#990000">
Hmm, okay. I've rebuilt the dll to give me a new aw.lib. however it doesn't
change the error messages I get when I try to build.
<p>Fungus.exe
<br>&nbsp;&nbsp;&nbsp; |________bot.obj (compilation of bot.ccp linked
to aw.h)
<br>&nbsp;&nbsp;&nbsp; |
<br>&nbsp;&nbsp;&nbsp; |________aw.lib (BC++ version)
<p>Info :Building...
<br>Info :Linking D:\bots\aw.dll
<br>Info :Transferring to C:\BC5\BIN\implib.exe at C:\WINDOWS\TEMP\RSP0.$$$
<br>Info :Compiling D:\bots\bot.cpp
<br>Warn :&nbsp; bot.cpp(19,11):Possibly incorrect assignment
<br><b><font color="#FF0000">// these appear when bot.ccp is compiled and
refer to all the if {rc = aw_init (AW_BUILD) and similar commands in the
sourcecode.</font></b>
<br>Warn :&nbsp; bot.cpp(28,11):Possibly incorrect assignment
<br>Warn :&nbsp; bot.cpp(38,11):Possibly incorrect assignment
<br>Warn :&nbsp; bot.cpp(44,11):Possibly incorrect assignment
<br>Warn :&nbsp; bot.cpp(53,11):Possibly incorrect assignment
<br>Info :Linking D:\bots\bot.exe
<br>Error:&nbsp; Error: Unresolved external '_aw_init' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_event_set' referenced
from D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_create' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_string_set' referenced
from D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_login' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_enter' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_int_set' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_state_change' referenced
from D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_wait' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_destroy' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_term' referenced from
D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_say' referenced from D:\BOTS\BOT.OBJ
<br>Error:&nbsp; Error: Unresolved external '_aw_string' referenced from
D:\BOTS\BOT.OBJ
<br>&nbsp;
</body>
</html>

Getting Started with SDK

Jan 12, 1999, 6:56pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#C0C0C0" link="#993366" vlink="#CC66CC" alink="#990000">
Getting sick of this yet? ;-)
<p>okay, this all sounds fine - makes sense and everything. But this is
what I get:
<p>when I
<br>> impdef fungus.def aw.dll
<p>I get a fungus.def that looks like
<p>LIBRARY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AW.DLL
<p>EXPORTS
<br>&nbsp;&nbsp;&nbsp; __DebuggerHookData&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at 1
<br>&nbsp;
<p>that's it - no external commands referenced at all
<br>and according to edward I guess this should be changed to
<p>EXPORTS
<br>&nbsp;&nbsp;&nbsp; _DebuggerHookData=DebuggerHookData
<p>as in
<p>Bar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at 1
<p>becomes
<p>_Bar=Bar
<br>&nbsp;
<p>however, whatever permutation of these suggestions I try the damn thing
still gives me the unresolved external errors. Thanks for the help btw,
edward + faber. Boy, I better get down to writing some pretty spectacular
bots to make all this worth it ;)
</body>
</html>

Getting Started with SDK

Jan 12, 1999, 7:41pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#C0C0C0" link="#993366" vlink="#CC66CC" alink="#990000">
lol, perhaps I should wait a while before posting (still looking for that
*unpost* button)
<p>anyway - I can get rid of all the error messages and get the program
to compile if I add in fungus.def lines like
<p>EXPORTS
<br>&nbsp;&nbsp;&nbsp; _aw_init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at 1
<br>&nbsp;&nbsp;&nbsp; _aw_blah_blah&nbsp;&nbsp;&nbsp; at 1
<p>so this must be kinda right? however I think get a " the bot.exe file
is linked to missing export AW>DLL:_aw_init. " error when starting the
program. I guess I'm still not impdef'ing properly to link in the _aw_init
and related events.
</body>
</html>

Getting Started with SDK

Jan 16, 1999, 1:58pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#C0C0C0" link="#993366" vlink="#CC66CC" alink="#990000">
<i>Hmm, unfortunately this trick doesnt seem to work with Bordland C++
5.0</i><i></i>
<p><i>the program will compile, but I get an error still complaining that
my exe is linked to missing export aw.dll:_aw_init</i><i></i>
<p><i>This is getting a bit tenuous now... I'm compiling as a win32 console
application, which according to borland accepts EXPORTS definitions so
that should be hunky dorey..... And I've tried all of the logical permutations
of _aw_init=aw_init, capitals, arrangement etc.</i><i></i>
<p><i>Perhaps someone could mail me a complete awBC++.lib file (just to
make sure it's not me being dumb emough to have miss-compiled the def file
in some way). Failing that the only thing I can think of is using the __export
command explicity in every line of the bot.c that calls an external function.
D'ya reckon that's worth a shot?</i><i></i>
[View Quote]

Getting Started with SDK

Jan 23, 1999, 2:09pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#C0C0C0" link="#993366" vlink="#CC66CC" alink="#990000">
Cool and Froody - thanks AEdificator :-)
<p>the def file worked just fine : trick was that it didnt require the
LIBRARY&nbsp; aw.lib line what I had at the top of my version of aw.def.
<p>Thanks for your help you two :-)
</body>
</html>

Constructing Bots

Jan 23, 1999, 2:13pm
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#C0C0C0" link="#993366" vlink="#CC66CC" alink="#990000">
<i>&nbsp;&nbsp;&nbsp; okay, okay.... now I have BC++ compiling properly
you have to contend with a few questions about programming too!</i><i></i>
<p><i>How would you recommend I construct the body of a chat-analysing
piece of code?</i><i></i>
<p><i>should I use something like strcmp( ) and a whole load of if loops
to sort through the responses, or is there a version of switch( ) that
will parse long chunks or characters?</i><i></i>
<p><i>Again, apologies for my microscopic (but hopefully growning) understanding
of C</i>
</body>
</html>

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