New Doom Forums  
Makefile/code needs updating for gcc ver. 4.0+ - New Doom Forums
Go Back   New Doom Forums > Source Ports > Doom Legacy > Legacy 2.0 Development

Reply
 
Thread Tools Display Modes
Old September 3rd, 2009, 09:19 PM   #1
Arbitrary
Commander Keen
 
Join Date: Apr 2007
Location: Somewhere
Posts: 5
Makefile/code needs updating for gcc ver. 4.0+

Just as fair warning, the makefile and the code will need a little updating. Versions of gcc at 4.0+ no longer include the "-fwritable-strings" option. The resulting compiler error is as follows...

Code:
g_game.c: In function ‘G_DoLoadGame’:                                           
g_game.c:2008: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness                                                                  
/usr/include/string.h:397: note: expected ‘const char *’ but argument is of type ‘byte *’                                                                       
g_game.c:2008: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness                                                        
g_game.c:2008: note: expected ‘const char *’ but argument is of type ‘byte *’   
g_game.c:2008: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness                                                                  
/usr/include/string.h:397: note: expected ‘const char *’ but argument is of type ‘byte *’
g_game.c:2008: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness
g_game.c:2008: note: expected ‘const char *’ but argument is of type ‘byte *’
g_game.c:2008: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness
g_game.c:2008: note: expected ‘const char *’ but argument is of type ‘byte *’
g_game.c:2008: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness
g_game.c:2008: note: expected ‘const char *’ but argument is of type ‘byte *’
g_game.c: In function ‘G_ReadDemoTiccmd’:
g_game.c:2324: error: lvalue required as increment operand
g_game.c:2325: error: lvalue required as increment operand
g_game.c:2335: error: lvalue required as increment operand
g_game.c:2337: error: lvalue required as increment operand
g_game.c:2343: error: lvalue required as increment operand
g_game.c:2350: error: lvalue required as increment operand
g_game.c:2352: error: lvalue required as increment operand
make: *** [../objs/g_game.o] Error 1
I'd fix it myself, but I'd have to do a little catchup on my programming before I would know what to fix. I did notice that the newest gcc compiler for linux does use the -march=pentium and -march=486 arguments instead of what was originally there.
Arbitrary is offline   Reply With Quote
Old September 4th, 2009, 08:51 AM   #2
Arbitrary
Commander Keen
 
Join Date: Apr 2007
Location: Somewhere
Posts: 5
Correction... the above error is if you remove the argument '-fwritable strings'. If it is still included, the compiler mentions right away that it doesn't understand the option and halts the creation of the program.
Arbitrary is offline   Reply With Quote
Old September 18th, 2009, 10:08 PM   #3
smite-meister
 
smite-meister's Avatar
 
Join Date: Dec 2002
Location: Boston, MA
Posts: 572
That's the source code to Legacy 1.43, not 2.0.

The 2.0 source should compile out of the box and can be found here:
https://doomlegacy.svn.sourceforge.n...y/legacy/trunk
__________________
Member of the DooM Legacy Team
smite-meister is offline   Reply With Quote
Old September 19th, 2009, 01:34 PM   #4
lead
Commander Keen
 
Join Date: May 2005
Posts: 9
Is there a way to fix this to get 1.43 to compile?
lead is offline   Reply With Quote
Old September 20th, 2009, 12:32 PM   #5
MR_ROCKET
 
MR_ROCKET's Avatar
 
Join Date: Apr 2001
Location: Somewhere between Space and Time
Posts: 5,185
Is there any way we could get a new legacy 2.0 win32 binary? :P
MR_ROCKET is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating Wiki imd1b4u Doomsday 2 October 3rd, 2007 09:24 PM
[Resolved] cannot find input file: Makefile.in Replicators Doomsday 7 July 28th, 2006 04:39 AM
updating dOOmwarrior_Mars DOOM Series 1 October 6th, 2005 04:07 PM
updating doomsday? an_imp Doomsday 1 August 24th, 2004 06:25 AM
legacy makefile p Doom Legacy 12 March 5th, 2002 11:43 AM


All times are GMT -7. The time now is 05:09 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
NewDoom.com © 2000-2009 Mindless Games & Entertainment. All Rights Reserved.