PiRSquared17 / quadra

Automatically exported from code.google.com/p/quadra
0 stars 0 forks source link

Compilation issues of quadra-sdl related to stdlib.h #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have fetched the latest SVN code from the quadra-sdl branch, then run make.
Since I had the SDL detection problem from
http://code.google.com/p/quadra/issues/detail?id=51 I used the same
workaround by modifying the config.mk file.
Then when running make, it stops with this problem:

g++ -g -O2 -I/usr/include/SDL -Wall -pipe -Iinclude -Iskelton/include
-Iimages -DLIBGAMESDIR=\"/usr/local/lib/games\"
-DDATAGAMESDIR=\"/usr/local/share/games\" -DVERSION="1.3.0svn"
-DVERSION_MAJOR=1 -DVERSION_MINOR=3 -DVERSION_PATCHLEVEL=0 -DNDEBUG  -c -o
source/fonts.o source/fonts.cpp
In file included from source/fonts.cpp:23:
skelton/include/res.h: In member function ‘virtual int Res_mem::read(void*,
int)’:
skelton/include/res.h:57: error: ‘memset’ was not declared in this scope
skelton/include/res.h:60: error: ‘memcpy’ was not declared in this scope
make: *** [source/fonts.o] Erreur 1

I have no idea why these functions from stdlib.h are not found.

Any idea?

PS: I am using opensuse 11

Original issue reported on code.google.com by PVinc...@googlemail.com on 22 Aug 2008 at 12:47

GoogleCodeExporter commented 9 years ago
On my Gentoo box it compiles fine.

Original comment by PVinc...@googlemail.com on 22 Aug 2008 at 1:08

GoogleCodeExporter commented 9 years ago
According to the man page, these functions are provided by string.h, not 
stdlib.h, so
it's just a stroke of luck that string.h happened to be included, somehow, and 
this
doesn't happen everywhere, apparently. Better add the proper include so that it 
works
everywhere!

Could you run the following command on your Opensuse box?

make -k 2>&1 grep '***'

This should give us the list of files that are affected.

I fixed this particular instance.

Original comment by pphaneuf on 22 Aug 2008 at 5:39

GoogleCodeExporter commented 9 years ago
I guess you meant: make -k 2>&1 | grep -e '\*\*\*'

Here is the output:
make: *** [source/fonts.o] Erreur 1
make: *** [source/highscores.o] Erreur 1
make: *** [skelton/common/http_request.o] Erreur 1
make: *** [skelton/common/packet.o] Erreur 1
make: *** [skelton/common/res_compress.o] Erreur 1
make: *** [skelton/common/reswriter.o] Erreur 1
make: *** [skelton/common/stringtable.o] Erreur 1
make: *** [skelton/svgalib/res.o] Erreur 1
make: *** [skelton/tools/wadder/wadder.o] Erreur 1

This only lists the object files, not the sources/includes, so I ran the 
following
command and attached the output:
make -k > compilation_errors.txt 2>&1

Original comment by PVinc...@googlemail.com on 23 Aug 2008 at 2:39

Attachments:

GoogleCodeExporter commented 9 years ago
Should be fixed by r624 and r626. Can you verify? Thanks!

Original comment by pphaneuf on 25 Aug 2008 at 1:13

GoogleCodeExporter commented 9 years ago
Compilation now works in both trunk and quadra-sdl branch.

Original comment by PVinc...@googlemail.com on 26 Aug 2008 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by pphaneuf on 26 Aug 2008 at 8:45