Thread

unresolved external symbols (Sdk)

unresolved external symbols // Sdk

1  |  

jan-willem de bleser

Oct 6, 1998, 11:20pm
This is a multi-part message in MIME format.
--------------00E7F3DA9D42673E76D95851
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

has anyone actually found out what causes this error?

--------------------Configuration: roadbuilder - Win32
Debug--------------------
Compiling...
roadbuilder.cpp
Linking...
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_term
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_destroy
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_wait
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_state_change
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_int_set
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_enter
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_login
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_string_set
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_create
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_init
roadbuilder.obj : error LNK2001: unresolved external symbol
__imp__aw_object_add
Debug/roadbuilder.exe : fatal error LNK1120: 11 unresolved externals
Error executing link.exe.
roadbuilder.exe - 12 error(s), 0 warning(s)

--------------00E7F3DA9D42673E76D95851
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------00E7F3DA9D42673E76D95851--

edward sumerfield

Oct 7, 1998, 12:43am
This error means that the code in roadbuilder.cpp and therefore the
functions from roadbuilder.obj do not exist in the objects that are being
included in the link command.

I notice you are using the cpp suffix. This is a C++ suffix and is therefore
compiled a little differently to C code. Look up function name mangling if
you want to learn more.

I am not sure what compiler you are using but you might want to try renaming
you code to a .c (lower case "c") file and try again.

Make sure that the link step includes the aw.lib file which is there all
these finctions exist.

Hey , I guess you are building a road builder, sounds cool. I hope you are
going to add the guestures for pooring tar and driving big rollers and such.
That will be fun to watch.

Edward Sumerfield.

[View Quote]

jan-willem de bleser

Oct 7, 1998, 7:07pm
This is a multi-part message in MIME format.
--------------48F463D9C9BFCC90B8986F05
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

he builds street1.rwx in a straight line. a stripped down robobuilder, that i
will probablye be allowed to use, because who is gonna cover a lot with roads?

[View Quote] > This error means that the code in roadbuilder.cpp and therefore the
> functions from roadbuilder.obj do not exist in the objects that are being
> included in the link command.
>
> I notice you are using the cpp suffix. This is a C++ suffix and is therefore
> compiled a little differently to C code. Look up function name mangling if
> you want to learn more.
>
> I am not sure what compiler you are using but you might want to try renaming
> you code to a .c (lower case "c") file and try again.
>
> Make sure that the link step includes the aw.lib file which is there all
> these finctions exist.
>
> Hey , I guess you are building a road builder, sounds cool. I hope you are
> going to add the guestures for pooring tar and driving big rollers and such.
> That will be fun to watch.
>
> Edward Sumerfield.
>
[View Quote]

--------------48F463D9C9BFCC90B8986F05
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------48F463D9C9BFCC90B8986F05--

jan-willem de bleser

Oct 7, 1998, 7:31pm
This is a multi-part message in MIME format.
--------------B25DC4C931AEE714E82B5AB7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

problem. i still get errors, but different odd ones that i cant figure out
Compiling...
roadbuilder.c
C:\Windows\Desktop\Projects\roadbuilder\roadbuilder.c(97) : error C2143:
syntax error : missing ';' before 'type'
C:\Windows\Desktop\Projects\roadbuilder\roadbuilder.c(98) : error C2065:
'count' : undeclared identifier
Error executing cl.exe.
roadbuilder.exe - 2 error(s), 0 warning(s)

heres the code:
void console_command(char input[81])
{
if(strstr(input, "build"))
{
int north, west, length, rc;

printf("\nNorth?");
scanf("%d", north);

printf("\nWest?");
scanf("%d", west);

printf("\nHow long?");
scanf("%d", length);

int count;
for(count = 0; count < length; count++)
{
aw_int_set (AW_OBJECT_X, west * 1000);
aw_int_set (AW_OBJECT_Y, 0);
aw_int_set (AW_OBJECT_Z, north * 1000);
aw_string_set (AW_OBJECT_MODEL, "street1.rwx");
if (rc = aw_object_add ())
printf ("Unable to add object (reason %d)\n", rc);
else
puts ("Object added");

west = west + 500;
north = north + 500;
}
}

[View Quote] > he builds street1.rwx in a straight line. a stripped down robobuilder, that i
> will probablye be allowed to use, because who is gonna cover a lot with roads?
>
[View Quote]

--------------B25DC4C931AEE714E82B5AB7
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------B25DC4C931AEE714E82B5AB7--

edward sumerfield

Oct 8, 1998, 2:32am
OK. I copied you code and made the attached h.c file. The following errors
existed prior to fixing:

gcc -g -I. -I//f/edward/products/awsdk -c h.c -o h.o
h.c: In function `console_command':
h.c:19: parse error before `int'
h.c:20: `count' undeclared (first use this function)
h.c:20: (Each undeclared identifier is reported only once
h.c:20: for each function it appears in.)
h.c:22: `AW_OBJECT_X' undeclared (first use this function)
h.c:23: `AW_OBJECT_Y' undeclared (first use this function)
h.c:24: `AW_OBJECT_Z' undeclared (first use this function)
h.c:25: `AW_OBJECT_MODEL' undeclared (first use this function)
h.c:36: parse error before `int'
make: *** [h.o] Error 1

I dare say you have included the aw.h file, just didn't include it in the
NG. So I added that afterwards.

You were missing a } at the end of the function. Again, maybe a cut and
paste error.

You can not declare a variable after a line of code in a block. A block
starts with an open curly, {. I moved the int count; up to the top of the if
statement.

As you can see I didn't get the same errors as you did. I added a makefile
for you if you don't have one already.

I can not complete the link step because I am using the GNU compiler and the
aw.lib object format is different but it should work for you.

Good luck.

Edward Sumerfield.

[View Quote]
begin 666 h.c
M(VEN8VQU9&4 at /'-T9&EO+F at ^#0HC:6YC;'5D92 \<W1D;&EB+F at ^#0HC:6YC
M;'5D92 \87<N:#X-" at T*=F]I9"!C;VYS;VQE7V-O;6UA;F0H8VAA<B!I;G!U
M=%LX,5TI#0I[#0H at (&EF("AS=')S='(H:6YP=70L(")B=6EL9"(I*2![#0H-
M"B at ("!I;G0 at ;F]R=& at L('=E<W0L(&QE;F=T:"P at <F,[#0H at (" at :6YT(&-O
M=6YT.PT*#0H at (" at <')I;G1F*")<;DYO<G1H/R(I.PT*(" at ('-C86YF*"(E
M9"(L(&YO<G1H*3L-"B at (" -"B at ("!P<FEN=&8H(EQN5V5S=#\B*3L-"B at
M("!S8V%N9B at B)60B+"!W97-T*3L-" at T*(" at ('!R:6YT9B at B7&Y(;W< at ;&]N
M9S\B*3L-"B at ("!S8V%N9B at B)60B+"!L96YG=& at I.PT*#0H at (" at 9F]R*&-O
M=6YT(#T at ,#L at 8V]U;G0 at /"!L96YG=& at [(&-O=6YT*RLI('L-" at T*(" at (" at
M87=?:6YT7W-E=" H05=?3T)*14-47U at L('=E<W0 at *B Q,# P*3L-"B at (" at
M(&%W7VEN=%]S970 at *$%77T]"2D5#5%]9+" P*3L-"B at (" at (&%W7VEN=%]S
M970 at *$%77T]"2D5#5%]:+"!N;W)T:" J(#$P,# I.PT*(" at (" at 87=?<W1R
M:6YG7W-E=" H05=?3T)*14-47TU/1$5,+" B<W1R965T,2YR=W at B*3L-"B at
M(" at (&EF("AR8R ](&%W7V]B:F5C=%]A9&0 at *"DI#0H)<')I;G1F(" at B56YA
M8FQE('1O(&%D9"!O8FIE8W0 at *')E87-O;B E9"E<;B(L(')C*3L-"B at (" at
M(&5L<V4-" at EP=71S(" at B3V)J96-T(&%D9&5D(BD[#0H-"B at (" at ('=E<W0 at
M/2!W97-T("L at -3 P.PT*(" at (" at ;F]R=& at at /2!N;W)T:" K(#4P,#L-"B at
M("!]#0H at ('T-"GT-" at T*;6%I;B at I('L-" at T*("!C;VYS;VQE7V-O;6UA;F0H
..(F)U:6QD(BD[#0I]#0H`
`
end

begin 666 Makefile.dat
M3$E"7U!!5$ at ]/S\_/S\_#0I)3D-?4$%42#T_/S\_/S\-" at T*0T9,04=3/2UG
M("U)+B M221[24Y#7U!!5$A]#0H-"F at N97AE.B!H+F\-" at EG*RL at :"YO("1[
83$E"7U!!5$A]+V%W+FQI8B M;R D0 T*
`
end

jan-willem de bleser

Oct 8, 1998, 9:15am
This is a multi-part message in MIME format.
--------------C477432BF5D02CD258CBA430
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



[View Quote] > OK. I copied you code and made the attached h.c file. The following errors

> existed prior to fixing:
>
> gcc -g -I. -I//f/edward/products/awsdk -c h.c -o h.o
> h.c: In function `console_command':
> h.c:19: parse error before `int'
> h.c:20: `count' undeclared (first use this function)
> h.c:20: (Each undeclared identifier is reported only once
> h.c:20: for each function it appears in.)
> h.c:22: `AW_OBJECT_X' undeclared (first use this function)
> h.c:23: `AW_OBJECT_Y' undeclared (first use this function)
> h.c:24: `AW_OBJECT_Z' undeclared (first use this function)
> h.c:25: `AW_OBJECT_MODEL' undeclared (first use this function)
> h.c:36: parse error before `int'
> make: *** [h.o] Error 1
>
> I dare say you have included the aw.h file, just didn't include it in the
> NG.

ng?

> So I added that afterwards.
>
> You were missing a } at the end of the function. Again, maybe a cut and
> paste error.

theres more of that function

>
>
> You can not declare a variable after a line of code in a block. A block
> starts with an open curly, {. I moved the int count; up to the top of the if
> statement.
>
> As you can see I didn't get the same errors as you did. I added a makefile
> for you if you don't have one already.
>
> I can not complete the link step because I am using the GNU compiler and the
> aw.lib object format is different but it should work for you.
>
> Good luck.
>
> Edward Sumerfield.
>
[View Quote]

--------------C477432BF5D02CD258CBA430
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------C477432BF5D02CD258CBA430--

jan-willem de bleser

Oct 8, 1998, 9:17am
This is a multi-part message in MIME format.
--------------640C349BFE6E3C1E226E475D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

i moved the var count and then got these familliar errors
--------------------Configuration: roadbuilder - Win32 Debug--------------------
Compiling...
roadbuilder.c
Linking...
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_term
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_destroy
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_wait
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_state_change
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_int_set
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_enter
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_login
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_string_set
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_create
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_init
roadbuilder.obj : error LNK2001: unresolved external symbol __imp__aw_object_add
Debug/roadbuilder.exe : fatal error LNK1120: 11 unresolved externals
Error executing link.exe.
roadbuilder.exe - 12 error(s), 0 warning(s)


[View Quote] > OK. I copied you code and made the attached h.c file. The following errors
> existed prior to fixing:
>
> gcc -g -I. -I//f/edward/products/awsdk -c h.c -o h.o
> h.c: In function `console_command':
> h.c:19: parse error before `int'
> h.c:20: `count' undeclared (first use this function)
> h.c:20: (Each undeclared identifier is reported only once
> h.c:20: for each function it appears in.)
> h.c:22: `AW_OBJECT_X' undeclared (first use this function)
> h.c:23: `AW_OBJECT_Y' undeclared (first use this function)
> h.c:24: `AW_OBJECT_Z' undeclared (first use this function)
> h.c:25: `AW_OBJECT_MODEL' undeclared (first use this function)
> h.c:36: parse error before `int'
> make: *** [h.o] Error 1
>
> I dare say you have included the aw.h file, just didn't include it in the
> NG. So I added that afterwards.
>
> You were missing a } at the end of the function. Again, maybe a cut and
> paste error.
>
> You can not declare a variable after a line of code in a block. A block
> starts with an open curly, {. I moved the int count; up to the top of the if
> statement.
>
> As you can see I didn't get the same errors as you did. I added a makefile
> for you if you don't have one already.
>
> I can not complete the link step because I am using the GNU compiler and the
> aw.lib object format is different but it should work for you.
>
> Good luck.
>
> Edward Sumerfield.
>
[View Quote]

--------------640C349BFE6E3C1E226E475D
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------640C349BFE6E3C1E226E475D--

esumerfd

Oct 8, 1998, 10:05am
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
NG = News group.
[View Quote]

esumerfd

Oct 8, 1998, 10:18am
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
Tell me more about your development environment. When IDE/C compiler are
you using. can you post your Makefile.
<P>Some theory for you.
<P>Source file called aa.c
<P>int aa() {
<BR>&nbsp;&nbsp;&nbsp; printf("In aa function.\n");
<BR>}
<P>Source file called main.c
<P>int aa();
<BR>main() {
<BR>&nbsp;&nbsp;&nbsp; aa();
<BR>}
<P>When you compile you will get main.obj and aa.obj. When you link you
can get main.exe for example.
<P>However, if I linked main.obj without specifying aa.obj I would get
<P>main.obj : error LNK2001: unresolved external symbol aa
<P>The next step is libraries. I can store the aa.obj in a library using
"ar ru aa.lib aa.obj" (unix command). Now when I link I will specify main.obj
and aa.lib. The linker is clever enough to open up .lib files and look
inside to find obj files.
<P>The functions that are failing to link are all stored in the aw.lib
file. So I am assuming that are are not specifying this library when you
link.<BR>
<BR>
<BR>My only confusion is that you still have the __imp__ prefix to the
funcitons. This prefix is usually due to C++ name mangling. This is the
process of taking a function name and attaching a prefix that encodes the
types of the arguments that it is passed. This allows C++ to do function
overloading. You should not be doing this in your C code.
<P>If you are using a C++ compiler maybe it is thinking that this is C++.
You can add code to tell the compiler the type of "linkage spec" to follow.
For example,
<P>extern "C" {
<P>&nbsp;&nbsp;&nbsp; int aa() {
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("In aa function.\n");
<BR>&nbsp;&nbsp;&nbsp; }
<BR>}
<P>With the extern "C" around the function a C++ compiler will not mangle
the function name. So I guess you could add this around your code but there
is probably a simpler way. This notation is in the standard header files.
Say I assume you are including &lt;stdio.h> and not &lt;iostream.h>? That
would certainly make a difference.
<P>Edward Sumerfield
[View Quote]

jan-willem de bleser

Oct 8, 1998, 8:27pm
This is a multi-part message in MIME format.
--------------13E3EB18C13EDF7098C7E89C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



[View Quote] > Tell me more about your development environment. When IDE/C compiler
> are you using.

VC4.0

> can you post your Makefile.

whats that?

>
>
> Some theory for you.
>
> Source file called aa.c
>
> int aa() {
> printf("In aa function.\n");
> }
>
> Source file called main.c
>
> int aa();
> main() {
> aa();
> }
>
> When you compile you will get main.obj and aa.obj. When you link you
> can get main.exe for example.
>
> However, if I linked main.obj without specifying aa.obj I would get
>
> main.obj : error LNK2001: unresolved external symbol aa
>
> The next step is libraries. I can store the aa.obj in a library using
> "ar ru aa.lib aa.obj" (unix command). Now when I link I will specify
> main.obj and aa.lib. The linker is clever enough to open up .lib files
> and look inside to find obj files.
>
> The functions that are failing to link are all stored in the aw.lib
> file. So I am assuming that are are not specifying this library when
> you link.
>
>
> My only confusion is that you still have the __imp__ prefix to the
> funcitons. This prefix is usually due to C++ name mangling. This is
> the process of taking a function name and attaching a prefix that
> encodes the types of the arguments that it is passed. This allows C++
> to do function overloading. You should not be doing this in your C
> code.

i dont know what you mean. i have other files that i have set up the
same way and they were fine. i have no idea why its doin this.

>
>
> If you are using a C++ compiler maybe it is thinking that this is C++.
> You can add code to tell the compiler the type of "linkage spec" to
> follow. For example,
>
> extern "C" {
>
> int aa() {
> printf("In aa function.\n");
> }
> }
>
> With the extern "C" around the function a C++ compiler will not mangle
> the function name. So I guess you could add this around your code but
> there is probably a simpler way. This notation is in the standard
> header files. Say I assume you are including <stdio.h> and not
> <iostream.h>? That would certainly make a difference.
>
> Edward Sumerfield
>
[View Quote]
--------------13E3EB18C13EDF7098C7E89C
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------13E3EB18C13EDF7098C7E89C--

jan-willem de bleser

Oct 8, 1998, 8:30pm
This is a multi-part message in MIME format.
--------------EC51F2ED743968105AE60D5C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



[View Quote] > Tell me more about your development environment. When IDE/C compiler
> are you using. can you post your Makefile.
>
> Some theory for you.
>
> Source file called aa.c
>
> int aa() {
> printf("In aa function.\n");
> }
>
> Source file called main.c
>
> int aa();
> main() {
> aa();
> }
>
> When you compile you will get main.obj and aa.obj. When you link you
> can get main.exe for example.
>
> However, if I linked main.obj without specifying aa.obj I would get
>
> main.obj : error LNK2001: unresolved external symbol aa
>
> The next step is libraries. I can store the aa.obj in a library using
> "ar ru aa.lib aa.obj" (unix command). Now when I link I will specify
> main.obj and aa.lib. The linker is clever enough to open up .lib files
> and look inside to find obj files.
>
> The functions that are failing to link are all stored in the aw.lib
> file. So I am assuming that are are not specifying this library when
> you link.
>
>
> My only confusion is that you still have the __imp__ prefix to the
> funcitons. This prefix is usually due to C++ name mangling. This is
> the process of taking a function name and attaching a prefix that
> encodes the types of the arguments that it is passed. This allows C++
> to do function overloading. You should not be doing this in your C
> code.
>
> If you are using a C++ compiler maybe it is thinking that this is C++.
> You can add code to tell the compiler the type of "linkage spec" to
> follow. For example,
>
> extern "C" {
>
> int aa() {
> printf("In aa function.\n");
> }
> }

if i do that, i get this error:--------------------Configuration:
roadbuilder - Win32 Debug--------------------
Compiling...
roadbuilder.c
C:\Windows\Desktop\Projects\roadbuilder\roadbuilder.c(84) : error C2059:
syntax error : 'string'
Error executing cl.exe.
roadbuilder.exe - 1 error(s), 0 warning(s)


>
>
> With the extern "C" around the function a C++ compiler will not mangle
> the function name. So I guess you could add this around your code but
> there is probably a simpler way. This notation is in the standard
> header files. Say I assume you are including <stdio.h> and not
> <iostream.h>? That would certainly make a difference.
>
> Edward Sumerfield
>
[View Quote]
--------------EC51F2ED743968105AE60D5C
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------EC51F2ED743968105AE60D5C--

jan-willem de bleser

Oct 8, 1998, 8:35pm
This is a multi-part message in MIME format.
--------------C2962EA0F4395EA2D553E918
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

here's my makefile:

# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Console Application" 0x0103

!IF "$(CFG)" == ""
CFG=roadbuilder - Win32 Debug
!MESSAGE No configuration specified. Defaulting to roadbuilder - Win32
Debug.
!ENDIF

!IF "$(CFG)" != "roadbuilder - Win32 Release" && "$(CFG)" !=\
"roadbuilder - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this
makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "roadbuilder.mak" CFG="roadbuilder - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "roadbuilder - Win32 Release" (based on\
"Win32 (x86) Console Application")
!MESSAGE "roadbuilder - Win32 Debug" (based on\
"Win32 (x86) Console Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################

# Begin Project
# PROP Target_Last_Scanned "roadbuilder - Win32 Debug"
CPP=cl.exe
RSC=rc.exe

!IF "$(CFG)" == "roadbuilder - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release

ALL : "$(OUTDIR)\roadbuilder.exe"

CLEAN :
- at erase ".\Release\roadbuilder.exe"
- at erase ".\Release\roadbuilder.obj"

"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX
/c
# ADD CPP /nologo /W3 /GX /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
/Fp"$(INTDIR)/roadbuilder.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Release/
CPP_SBRS=
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/roadbuilder.bsc"
BSC32_SBRS=
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
/nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo
/subsystem:console /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
/subsystem:console /incremental:no /pdb:"$(OUTDIR)/roadbuilder.pdb"\
/machine:I386 /out:"$(OUTDIR)/roadbuilder.exe"
LINK32_OBJS= \
"$(INTDIR)/roadbuilder.obj"

"$(OUTDIR)\roadbuilder.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) at <<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ELSEIF "$(CFG)" == "roadbuilder - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
OUTDIR=.\Debug
INTDIR=.\Debug

ALL : "$(OUTDIR)\roadbuilder.exe"

CLEAN :
- at erase ".\Debug\roadbuilder.exe"
- at erase ".\Debug\roadbuilder.obj"
- at erase ".\Debug\roadbuilder.ilk"
- at erase ".\Debug\roadbuilder.pdb"
- at erase ".\Debug\vc40.pdb"
- at erase ".\Debug\vc40.idb"

"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_CONSOLE" /YX /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_CONSOLE" /YX /c
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D
"_CONSOLE"\
/Fp"$(INTDIR)/roadbuilder.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
CPP_OBJS=.\Debug/
CPP_SBRS=
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/roadbuilder.bsc"
BSC32_SBRS=
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
/nologo /subsystem:console /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo
/subsystem:console /debug /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
/subsystem:console /incremental:yes /pdb:"$(OUTDIR)/roadbuilder.pdb"
/debug\
/machine:I386 /out:"$(OUTDIR)/roadbuilder.exe"
LINK32_OBJS= \
"$(INTDIR)/roadbuilder.obj"

"$(OUTDIR)\roadbuilder.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) at <<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ENDIF

..c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<

..cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<

..cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<

..c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<

..cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<

..cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<

################################################################################

# Begin Target

# Name "roadbuilder - Win32 Release"
# Name "roadbuilder - Win32 Debug"

!IF "$(CFG)" == "roadbuilder - Win32 Release"

!ELSEIF "$(CFG)" == "roadbuilder - Win32 Debug"

!ENDIF

################################################################################

# Begin Source File

SOURCE=.\Aw.dll

!IF "$(CFG)" == "roadbuilder - Win32 Release"

!ELSEIF "$(CFG)" == "roadbuilder - Win32 Debug"

!ENDIF

# End Source File
################################################################################

# Begin Source File

SOURCE=.\roadbuilder.c
DEP_CPP_ROADB=\
".\aw.h"\


"$(INTDIR)\roadbuilder.obj" : $(SOURCE) $(DEP_CPP_ROADB) "$(INTDIR)"


# End Source File
# End Target
# End Project
################################################################################



--------------C2962EA0F4395EA2D553E918
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------C2962EA0F4395EA2D553E918--

walter knupe

Oct 10, 1998, 4:29pm
all external references having "__imp__" in front are references to an
import library.

i am quite sure the output is generated if you forget to link with aw.lib

Walter



Jan-willem De Bleser schrieb in Nachricht
<361AC1F0.436F2673 at mediaone.net>...
>has anyone actually found out what causes this error?

>Linking...
>roadbuilder.obj : error LNK2001: unresolved external symbol
>__imp__aw_term
>roadbuilder.obj : error LNK2001: unresolved external symbol
>__imp__aw_destroy
[.. above lines repeat sort of 9 times.. ]
Debug/roadbuilder.exe : fatal error LNK1120: 11 unresolved externals

jan-willem de bleser

Oct 10, 1998, 7:05pm
This is a multi-part message in MIME format.
--------------F8AAA074582A97FDC116641F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

i use vc4.0. i have aw.lib in the lin directory. it has worked with other
bots. it doesnt work with this one or the sample one

[View Quote] > all external references having "__imp__" in front are references to an
> import library.
>
> i am quite sure the output is generated if you forget to link with aw.lib
>
> Walter
>
> Jan-willem De Bleser schrieb in Nachricht
> <361AC1F0.436F2673 at mediaone.net>...
>
> [.. above lines repeat sort of 9 times.. ]
> Debug/roadbuilder.exe : fatal error LNK1120: 11 unresolved externals



--------------F8AAA074582A97FDC116641F
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------F8AAA074582A97FDC116641F--

walter knupe

Oct 11, 1998, 1:29am
Jan,

its not enough to have the aw.lib in some directory, you also have to change
the project settings to actually link it to your programm.

but VC4.0 might not like the library format. so if the programm settings
really do try to link to it
the linker would complain about using a corrupt library.

Walter


Jan-willem De Bleser schrieb in Nachricht
<361FCC20.C1D22258 at mediaone.net>...
>i use vc4.0. i have aw.lib in the lin directory. it has worked with other
>bots. it doesnt work with this one or the sample one
>
[View Quote]

jan-willem de bleser

Oct 11, 1998, 12:43pm
This is a multi-part message in MIME format.
--------------DCB3EEEC5F4D22A4CADEB88C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



[View Quote] > Jan,
>
> its not enough to have the aw.lib in some directory, you also have to change
> the project settings to actually link it to your programm.

huh?

>
>
> but VC4.0 might not like the library format. so if the programm settings
> really do try to link to it
> the linker would complain about using a corrupt library.

nope. i have compiled other bots using the same library

>
>
> Walter
>
> Jan-willem De Bleser schrieb in Nachricht
> <361FCC20.C1D22258 at mediaone.net>...



--------------DCB3EEEC5F4D22A4CADEB88C
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jan-willem De Bleser
Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard
fn: Jan-willem De Bleser
n: De Bleser;Jan-willem
org: High school
email;internet: debleser at mediaone.net
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard


--------------DCB3EEEC5F4D22A4CADEB88C--

walter knupe

Oct 11, 1998, 4:19pm
Well,

in VC5 for example you go to Project Settings, select the linker tab, and
enter "aw.lib" in the "additional libraries" field. If you forget that, you
get the linker errors below.

Could it be that you compiled other sample bots or programms using different
settings ? or using a makefile ?

Walter


Jan-willem De Bleser schrieb in Nachricht
<3620C42B.7AEFB4EE at mediaone.net>...
[View Quote]
other
aw.lib

jw

Oct 11, 1998, 5:04pm
and in vc4.0?

[View Quote] > Well,
>
> in VC5 for example you go to Project Settings, select the linker tab, and
> enter "aw.lib" in the "additional libraries" field. If you forget that, you
> get the linker errors below.
>
> Could it be that you compiled other sample bots or programms using different
> settings ? or using a makefile ?
>
> Walter
>
> Jan-willem De Bleser schrieb in Nachricht
> <3620C42B.7AEFB4EE at mediaone.net>...
> change
>
> other
> aw.lib

jw

Oct 11, 1998, 5:06pm
Thanks. it worked. roadbuilder will soon be posted and source if you want

[View Quote] > Well,
>
> in VC5 for example you go to Project Settings, select the linker tab, and
> enter "aw.lib" in the "additional libraries" field. If you forget that, you
> get the linker errors below.
>
> Could it be that you compiled other sample bots or programms using different
> settings ? or using a makefile ?
>
> Walter
>
> Jan-willem De Bleser schrieb in Nachricht
> <3620C42B.7AEFB4EE at mediaone.net>...
> change
>
> other
> aw.lib

jw

Oct 11, 1998, 5:19pm
ok. now i have another problem. i have the program. it seems fine, but when i run
it, nothing is displayed. i know that the account is wrong, but it doesnt display
the error message. nothing happens.

[View Quote] > Thanks. it worked. roadbuilder will soon be posted and source if you want
>
[View Quote]

edward sumerfield

Oct 11, 1998, 7:13pm
Post the code dude.

Edward Sumerfield.

[View Quote]

edward sumerfield

Oct 11, 1998, 7:53pm
I saw that you had solved your problem further down but just as an FYI, you
will notice that there is no reference to aw.lib in this makefile.

A makefile defines what programs are compiled and linked. It is a very
generic process format that can be used to do anything but is usually used
in this context.

MS VC++ dynamically generates its Makefile based on what you add to the
various properties fields.

Edward Sumerfield.

[View Quote]

jw

Oct 11, 1998, 8:08pm
#include <aw.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <fstream.h>
#include <iostream.h>
#include <string.h>

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

int rc;
char junk[1], input[81];

printf("Created by Jan-willem De Bleser. Debleser at mediaone.net\n\n");

if (rc = aw_init (AW_BUILD)) {
fprintf(stderr, "Unable to initialize API (reason %d)\n", rc);
printf("Press any key to continue");
gets (junk);
exit (1);
}

if (rc = aw_create (0, 0, 0)) {
fprintf(stderr, "Unable to create bot instance (reason %d)\n", rc);
printf("Press any key to continue");
gets (junk);
exit (1);
}

aw_int_set (AW_LOGIN_OWNER, 268211);
aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, "5402");
aw_string_set (AW_LOGIN_APPLICATION, "");
aw_string_set (AW_LOGIN_NAME, "NULL");
if (rc = aw_login ()) {
fprintf(stderr, "Unable to login (reason %d)\n", rc);
printf("Press any key to continue");
gets (junk);
exit (1);
}

if (rc = aw_enter (argv[1], 0)) {
fprintf(stderr, "Unable to enter world (reason %d)\n", rc);
printf("Press any key to continue");
gets (junk);
exit (1);
}

aw_int_set (AW_MY_X, 0); /* E/W */
aw_int_set (AW_MY_Z, 0); /* N/S */
aw_int_set (AW_MY_YAW, 0); /* angle facing */
aw_int_set (AW_MY_TYPE, 0);
if (rc = aw_state_change ()) {
fprintf(stderr, "Unable to change state (reason %d)\n", rc);
printf("Press any key to continue");
gets (junk);
exit (1);
}

while (!aw_wait (1))
{
if(_kbhit())
{
gets(input);
if(strstr(input, "build"))
{
int north, west, length, rc, count;

printf("\nNorth?");
scanf("%d", north);

printf("\nWest?");
scanf("%d", west);

printf("\nHow long?");
scanf("%d", length);

for(count = 0; count < length; count++)
{
aw_int_set (AW_OBJECT_X, west * 1000);
aw_int_set (AW_OBJECT_Y, 0);
aw_int_set (AW_OBJECT_Z, north * 1000);
aw_string_set (AW_OBJECT_MODEL, "street1.rwx");
if (rc = aw_object_add ())
printf ("Unable to add object (reason %d)\n", rc);
else
puts ("Object added");

west = west + 500;
north = north + 500;
}
}

if(strstr(input, "exit"))
exit(0);
}
}

aw_destroy ();
aw_term ();
return 0;

}

jw

Oct 11, 1998, 8:10pm
i trust nobody will steal it.

[View Quote] > Post the code dude.
>
> Edward Sumerfield.
>
[View Quote]

jw

Oct 11, 1998, 8:10pm
i trust nobody will steal it and release a roadbuilder of their own bfore me.

[View Quote] > Post the code dude.
>
> Edward Sumerfield.
>
[View Quote]

walter knupe

Oct 11, 1998, 8:37pm
Jw,

your code compiles, links and runs fine here, and displays a login error as
you expected.

i can't see a problem in the source.

you would have to give as much information as possible about what you tried,
what you entered and so on.

walter



Jw schrieb in Nachricht <36212CF1.3DCE681F at mediaone.net>...
>i trust nobody will steal it and release a roadbuilder of their own bfore
me.
>
[View Quote]

jw

Oct 11, 1998, 8:45pm
i did exactly what you said, but got a blank console. im gonna try it in msdos
mode

[View Quote] > Jw,
>
> your code compiles, links and runs fine here, and displays a login error as
> you expected.
>
> i can't see a problem in the source.
>
> you would have to give as much information as possible about what you tried,
> what you entered and so on.
>
> walter
>
> Jw schrieb in Nachricht <36212CF1.3DCE681F at mediaone.net>...
> me.
> when
> doesnt

jw

Oct 11, 1998, 8:52pm
i fixed it. it was an error. i rebooted and it went away

[View Quote] > Jw,
>
> your code compiles, links and runs fine here, and displays a login error as
> you expected.
>
> i can't see a problem in the source.
>
> you would have to give as much information as possible about what you tried,
> what you entered and so on.
>
> walter
>
> Jw schrieb in Nachricht <36212CF1.3DCE681F at mediaone.net>...
> me.
> when
> doesnt

jw

Oct 11, 1998, 8:54pm
can anyone lend me a privelege pass because cof hasnt renewed my account, so i
cant try the bot.

[View Quote] > i fixed it. it was an error. i rebooted and it went away
>
[View Quote]

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