Smaug 1.4a Compilation Error

Posted by Curly on Thu 22 Jun 2006 11:18 AM — 3 posts, 16,989 views.

United Kingdom #0
I have installed Smaug a couple of times and have had no real problems so was a bit confused when I finally got one.

One running the make all I get the following on Linux:

make smaug
make[1]: Entering directory `/home/curly/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_move.c
act_move.c:393:15: warning: trigraph ??> ignored, use -trigraphs to enable
act_move.c: In function ‘generate_exit’:
act_move.c:604: error: invalid lvalue in assignment
make[1]: *** [act_move.o] Error 1
make[1]: Leaving directory `/home/curly/dist/src'
make: *** [all] Error 2

Any help would be appreciated

Thanks,
#1
Go into your src folder, and open act_move.c with a text editor (www.textpad.com), then hit ctrl+g, and type in 604 (which is a line number). Then copy the segment around that, and post it up here so folks can see what is up. =)

Gadush

PS, don't forget to use the forum codes to enclose your code portion of the post.

Amended on Thu 22 Jun 2006 11:18 PM by Gadush
USA #2
This is actually something that comes up a fair amount. In fact, searching for generate_exit shows a fair number of people with the same problem.

The line in question is this: (EXIT_DATA *) pexit = xit;

If I remember correctly, pexit is of type EXIT_DATA** -- that is, a pointer to a pointer to an EXIT_DATA. I think that the correct line should be something like: *pexit = xit;.

The reason this error shows up only for some people is that the newer compilers are much pickier (in fact, they're much more correct regarding the language), and not everybody has the newest compilers.