Comments (5)
im working on it and it's not the whole last block from 1935 as id hoped. literally the functions where the errors happen. is what the previousposters meant I believe.
Edit:
Solved the Wreturn errors that happened by inserting "return 0;"
I'm left with backwards compat issues. I'm new to compiling so will update this.
from cataclysm.
My take on the compilation errors. I'll leave it here for anyone trying to compile Cataclysm.
Error 1: iuse.cpp:314:77: error: ‘add_msg’ was not declared in this scope
Solution: iuse.cpp, line 314, replace add_msg
with g->add_msg
.
Error 2: item.cpp:282:43: error: ‘struct it_comest’ has no member named ‘health’; did you mean ‘healthy’?
Solution: item.cpp, line 282, replace health
with healthy
.
Error 3: game.h:56:8: error: invalid initialization of non-const reference of type ‘calendar&’ from an rvalue of type ‘calendar’
Solution: Comment-out or delete the whole operator thing because it's not used anywhere else. Maybe it can be fixed some other way, but this seems to work fine.
calendar.h, line 55, comment it: // calendar& operator = (calendar &rhs);
calendar.cpp, line 55 to 86, comment all /* ... */
Error 4: map.cpp:1923:15: error: ‘x’ was not declared in this scope
Reason is map::sees is unfinished, like //WIP: faster map::sees
comment suggests.
Solution: delete the unfinished implementation, because it is followed by an old one.
map.cpp, line 1915, delete lines from 1915 to 1929.
Segfault: Then I get a segfault on game start that is related to the unarmed styles macro. The problem is this line: setvector((static_cast<it_style*>(itypes[index]))->moves, __VA_ARGS__, NULL);
which apparently writes moves for each style. Commenting this line fixes the segfault but breaks unarmed styles.
from cataclysm.
Unfortunately, since I was replacing my old hard drive with a new one, I
had to do one last commit of Cataclysm - in a non-working state. I'd try
pulling one or two commits before the latest one. One of those should
compile!
On Sun, Apr 6, 2014 at 2:10 PM, Henorvell Ge [email protected]:
g++ -O3 -c item.cpp -o obj/item.o
item.cpp: In member function 'std::string item::info(bool)':
item.cpp:282:43: error: 'struct it_comest' has no member named 'health'
"\n Healthiness: " << int(food->health);
^
make: *** [obj/item.o] Error 1this is what i get.How to solve it?
Reply to this email directly or view it on GitHubhttps://github.com//issues/73
.
from cataclysm.
I got it to work.
First bug: line 282 of item.cpp. Add the letter y to the end of the world health.
Here's the relevant compilation message, not sure how to put it in a code tag on github:
item.cpp: In member function ‘std::string item::info(bool)’:
item.cpp:282:43: error: ‘struct it_comest’ has no member named ‘health’
"\n Healthiness: " << int(food->health);
^
make: *** [obj/item.o] Error 1
To fix the second bug, I commented out line 314 of iuse.cpp.
g++ -O3 -c iuse.cpp -o obj/iuse.o
iuse.cpp: In member function ‘void iuse::vitamins(game_, player_, item_, bool)’:
iuse.cpp:314:77: error: ‘add_msg’ was not declared in this scope
add_msg("You have the feeling that these vitamins won't do you any good.");
^
make: *_* [obj/iuse.o] Error 1
Third bug is a set of bugs with map.cpp.
g++ -O3 -c map.cpp -o obj/map.o
map.cpp: In member function ‘bool map::sees(int, int, int, int, int, int&)’:
map.cpp:1923:15: error: ‘x’ was not declared in this scope
if (!trans(x, y))
^
map.cpp:1935:1: error: expected primary-expression before ‘bool’
bool map::sees(int Fx, int Fy, int Tx, int Ty, int range, int &tc)
^
map.cpp:2432:1: error: expected ‘,’ or ‘;’ at end of input
}
^
map.cpp:2432:1: error: expected ‘}’ at end of input
map.cpp:2432:1: error: expected ‘}’ at end of input
make: *** [obj/map.o] Error 1
from cataclysm.
So how did you fix the 3rd set of bugs? - looking at the code i guess you could just comment that whole function?
from cataclysm.
Related Issues (20)
- Same object can be both tool and componant
- Wood axe typo HOT 1
- Applying hammer to barricade windows, doors, doesn't check for materials on ground HOT 1
- turrets can walk HOT 1
- Segfault using bows
- Segfault and Preset Character HOT 1
- Missile silo HOT 1
- Segfault when falling from multiple ledges
- Segfault when holding direction key HOT 1
- Stack overflow on windows due to large, stack-allocated object
- Compile flag for ncurses
- current git HEAD can't be compiled (gcc4.2): missing 'player_activity::player_activity(player_activity)' HOT 2
- No stacking of crafting goes_bad consumables HOT 1
- Lastest source code pull won't make HOT 4
- Templates don't save unless the game files are on the desktop.
- Wacky Scent message in tutorial after death
- Look Around text frame sides stays on the screen after closing
- Can't wear helmet in latest experimental HOT 2
- Steam Release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cataclysm.