Hi,
Followed the instructions on compiling on Windows using MingW. I get the error below. I googled it and found a Stack Overflow comment which was not helpful.
Here is the error:
In file included from c:\mingw\include\dirent.h:29:0,
from src/file_finder.cpp:12:
c:\mingw\include\io.h:301:14: error: 'off64_t' does not name a type
__CRT_INLINE off64_t lseek64 (int, off64_t, int);
^
c:\mingw\include\io.h:302:14: error: 'off64_t' does not name a type
__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
^
src/file_finder.cpp: In static member function 'static std::__debug::vector > file_finder::get_files_from_path(std::string, std::string,
bool, bool)':
src/file_finder.cpp:55:25: error: aggregate 'file_finder::get_files_from_path(st
d::string, std::string, bool, bool)::stat _buff' has incomplete type and cannot
be defined
struct stat _buff;
^
src/file_finder.cpp:60:51: error: invalid use of incomplete type 'struct file_fi
nder::get_files_from_path(std::string, std::string, bool, bool)::stat'
if( stat(root_file->d_name, &_buff) != 0x4 ) {
^
src/file_finder.cpp:55:20: error: forward declaration of 'struct file_finder::ge
t_files_from_path(std::string, std::string, bool, bool)::stat'
struct stat _buff;
^
src/file_finder.cpp: In static member function 'static std::__debug::vector > file_finder::get_directories_with(std::__debug::vector >, std::string, bool)':
src/file_finder.cpp:121:25: error: aggregate 'file_finder::get_directories_with(
std::__debug::vector >, std::string, bool)::stat _buff'
has incomplete type and cannot be defined
struct stat _buff;
^
src/file_finder.cpp:126:51: error: invalid use of incomplete type 'struct file_f
inder::get_directories_with(std::__debug::vector >, std:
:string, bool)::stat'
if( stat(root_file->d_name, &_buff) != 0x4 ) {
^
src/file_finder.cpp:121:20: error: forward declaration of 'struct file_finder::g
et_directories_with(std::__debug::vector >, std::string,
bool)::stat'
struct stat _buff;
^
make: *** [objwin/file_finder.o] Error 1
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
That's a bug in mingw source. Try replacing off64_t to off64
Flagged accordingly. Sorry, Yuioup.
I get the same errors on Windows with MinGW. Replacing off64_t with _off64_t (off64 doesn´t work) helps for this specific error, but the other errors still occur.
Full build log:
make TILES=1 NATIVE=win32
/bin/sh: line 1: git: command not found
#define VERSION "0.A"
mkdir -p objwin/tiles
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/action.cpp -o objwin/tiles/action.o
src/action.cpp: In function 'action_id handle_action_menu()':
src/action.cpp:712:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (width < entry->txt.length()) {
^
src/action.cpp:719:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
int iy = (TERMY > entries.size() + 2) ? (TERMY - entries.size() -2) / 2 -1 : 0;
^
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/addiction.cpp -o objwin/tiles/addiction.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/advanced_inv.cpp -o objwin/tiles/advanced_inv.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/ammo.cpp -o objwin/tiles/ammo.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/animation_curses.cpp -o objwin/tiles/animation_curses.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/animation_tiles.cpp -o objwin/tiles/animation_tiles.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/armor_layers.cpp -o objwin/tiles/armor_layers.o
src/armor_layers.cpp: In member function 'void player::sort_armor()':
src/armor_layers.cpp:134:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
leftListSize = (tmp_worn.size() < cont_h - 2) ? tmp_worn.size() : cont_h - 2;
^
src/armor_layers.cpp:161:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (leftListSize > tmp_worn.size()) {
^
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/artifact.cpp -o objwin/tiles/artifact.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/auto_pickup.cpp -o objwin/tiles/auto_pickup.o
src/auto_pickup.cpp: In function 'void show_auto_pickup()':
src/auto_pickup.cpp:158:73: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = iStartPos; i < vAutoPickupRules[iCurrentPage].size(); i++) {
^
src/auto_pickup.cpp:160:88: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
i < iStartPos + ((iContentHeight > vAutoPickupRules[iCurrentPage].size()) ?
^
src/auto_pickup.cpp:161:88: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
vAutoPickupRules[iCurrentPage].size() : iContentHeight)) {
^
src/auto_pickup.cpp:211:69: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (iCurrentLine >= vAutoPickupRules[iCurrentPage].size()) {
^
src/auto_pickup.cpp:227:72: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (iCurrentLine > vAutoPickupRules[iCurrentPage].size() - 1) {
^
src/auto_pickup.cpp:292:72: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (iCurrentLine < vAutoPickupRules[iCurrentPage].size() - 1) {
^
src/auto_pickup.cpp: In function 'void test_pattern(int, int)':
src/auto_pickup.cpp:394:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = iStartPos; i < vMatchingItems.size(); i++) {
^
src/auto_pickup.cpp:396:72: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
i < iStartPos + ((iContentHeight > vMatchingItems.size()) ? vMatchingItems.size() :
^
src/auto_pickup.cpp:397:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
iContentHeight)) {
^
src/auto_pickup.cpp:421:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (iCurrentLine >= vMatchingItems.size()) {
^
src/auto_pickup.cpp: In function 'bool auto_pickup_match(std::string, std::string)':
src/auto_pickup.cpp:814:61: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((iPos = ci_find_substr(sText, *it)) == -1) {
^
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/basecamp.cpp -o objwin/tiles/basecamp.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/bionics.cpp -o objwin/tiles/bionics.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/bodypart.cpp -o objwin/tiles/bodypart.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/calendar.cpp -o objwin/tiles/calendar.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/cata_tiles.cpp -o objwin/tiles/cata_tiles.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/catacharset.cpp -o objwin/tiles/catacharset.o
src/catacharset.cpp: In member function 'size_t utf8_wrapper::byte_start_display(size_t, size_t) const':
src/catacharset.cpp:454:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(start >= width) {
^
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/catalua.cpp -o objwin/tiles/catalua.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/char_validity_check.cpp -o objwin/tiles/char_validity_check.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/character.cpp -o objwin/tiles/character.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/clzones.cpp -o objwin/tiles/clzones.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/color.cpp -o objwin/tiles/color.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/computer.cpp -o objwin/tiles/computer.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/construction.cpp -o objwin/tiles/construction.o
src/construction.cpp: In function 'void construction_menu()':
src/construction.cpp:101:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (available.size() + 2 < iMaxY) {
^
src/construction.cpp:153:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (available.size() > iMaxY) {
^
src/construction.cpp:158:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} else if (offset + iMaxY -2 > available.size()) {
^
src/construction.cpp:170:72: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < iMaxY - 2 && (i + offset) < available.size(); i++) {
^
src/construction.cpp:182:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
(current < hotkeys.size()) ? hotkeys[current] : ' ',
^
src/construction.cpp:261:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (select < available.size() - 1) {
^
src/construction.cpp:276:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( select > available.size() - 1 ) {
^
src/construction.cpp:301:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( chosen == std::string::npos ) {
^
src/construction.cpp:305:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (chosen < available.size()) {
^
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/crafting.cpp -o objwin/tiles/crafting.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/creature.cpp -o objwin/tiles/creature.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/creature_tracker.cpp -o objwin/tiles/creature_tracker.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/cursesport.cpp -o objwin/tiles/cursesport.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/damage.cpp -o objwin/tiles/damage.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/debug.cpp -o objwin/tiles/debug.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/defense.cpp -o objwin/tiles/defense.o
src/defense.cpp: In member function 'void defense_game::init_map()':
src/defense.cpp:305:12: warning: enumeration value 'DEFLOC_NULL' not handled in switch [-Wswitch]
switch (location) {
^
src/defense.cpp:305:12: warning: enumeration value 'NUM_DEFENSE_LOCATIONS' not handled in switch [-Wswitch]
src/defense.cpp: In member function 'void defense_game::init_to_style(defense_style)':
src/defense.cpp:405:12: warning: enumeration value 'DEFENSE_CUSTOM' not handled in switch [-Wswitch]
switch (new_style) {
^
src/defense.cpp:405:12: warning: enumeration value 'NUM_DEFENSE_STYLES' not handled in switch [-Wswitch]
src/defense.cpp: In member function 'void defense_game::caravan()':
src/defense.cpp:1018:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (item_selected < items[category_selected].size() - 1) {
^
src/defense.cpp:1144:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (total_price > g->u.cash) {
^
src/defense.cpp:1173:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
g->u.inv.size() < inv_chars.size()) {
^
src/defense.cpp: In function 'std::string caravan_category_name(caravan_category)':
src/defense.cpp:1189:12: warning: enumeration value 'NUM_CARAVAN_CATEGORIES' not handled in switch [-Wswitch]
switch (cat) {
^
src/defense.cpp: In function 'std::__debug::vector<std::basic_string<char> > caravan_items(caravan_category)':
src/defense.cpp:1211:12: warning: enumeration value 'NUM_CARAVAN_CATEGORIES' not handled in switch [-Wswitch]
switch (cat) {
^
src/defense.cpp: In function 'void draw_caravan_categories(WINDOW*, int, int, long unsigned int)':
src/defense.cpp:1324:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
wprintz(w, (total_price > cash ? c_red : c_green), "%d", cash - total_price);
^
src/defense.cpp: In function 'void draw_caravan_items(WINDOW*, std::__debug::vector<std::basic_string<char> >*, std::__debug::vector<int>*, int, int)':
src/defense.cpp:1344:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (item_selected < items->size()) {
^
src/defense.cpp:1353:82: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = offset; i <= offset + FULL_SCREEN_HEIGHT - 2 && i < items->size(); i++) {
^
src/defense.cpp:1359:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
wprintz(w, (price > g->u.cash ? c_red : c_green), "($%6d)", price);
^
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/dependency_tree.cpp -o objwin/tiles/dependency_tree.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/disease.cpp -o objwin/tiles/disease.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/editmap.cpp -o objwin/tiles/editmap.o
src/editmap.cpp: In function 'std::__debug::vector<std::basic_string<char> > fld_string(std::string, int)':
src/editmap.cpp:46:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while( linepos < str.length() || crpos != -1 ) {
^
src/editmap.cpp:57:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( spacepos < str.length() ) {
^
src/editmap.cpp: In member function 'void editmap_hilight::draw(editmap*, bool)':
src/editmap.cpp:141:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( cur_blink >= blink_interval.size() ) {
^
src/editmap.cpp: In member function 'int editmap::edit_itm()':
src/editmap.cpp:1211:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( ilmenu.ret >= 0 && ilmenu.ret < items.size() ) {
^
src/editmap.cpp: In member function 'int editmap::mapgen_preview(real_coords&, uimenu&)':
src/editmap.cpp:1653:70: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < srcsm->vehicles.size(); i++ ) { // copy vehicles to real map
^
src/editmap.cpp:1666:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < srcsm->spawns.size(); i++) { // copy spawns
^
src/editmap.cpp: In member function 'int editmap::edit_mapgen()':
src/editmap.cpp:1817:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < oterlist.size(); i++) {
^
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/effect.cpp -o objwin/tiles/effect.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/event.cpp -o objwin/tiles/event.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/faction.cpp -o objwin/tiles/faction.o
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/field.cpp -o objwin/tiles/field.o
src/field.cpp: In member function 'bool map::process_fields_in_submap(submap*, int, int)':
src/field.cpp:982:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < it->size(); i++) {
^
src/field.cpp:364:24: warning: enumeration value 'fd_web' not handled in switch [-Wswitch]
switch (curtype) {
^
src/field.cpp:364:24: warning: enumeration value 'fd_slime' not handled in switch [-Wswitch]
src/field.cpp:364:24: warning: enumeration value 'fd_rubble' not handled in switch [-Wswitch]
src/field.cpp:364:24: warning: enumeration value 'fd_plasma' not handled in switch [-Wswitch]
src/field.cpp:364:24: warning: enumeration value 'fd_laser' not handled in switch [-Wswitch]
src/field.cpp:364:24: warning: enumeration value 'num_fields' not handled in switch [-Wswitch]
src/field.cpp: In member function 'void map::step_in_field(int, int)':
src/field.cpp:1243:16: warning: enumeration value 'fd_gibs_flesh' not handled in switch [-Wswitch]
switch (cur->getFieldType()) {
^
src/field.cpp:1243:16: warning: enumeration value 'fd_gibs_veggy' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_slime' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_gas_vent' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_fire_vent' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_push_items' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_plasma' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_laser' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_blood_veggy' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_blood_insect' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_blood_invertebrate' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_gibs_insect' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'fd_gibs_invertebrate' not handled in switch [-Wswitch]
src/field.cpp:1243:16: warning: enumeration value 'num_fields' not handled in switch [-Wswitch]
src/field.cpp: In member function 'void map::mon_in_field(int, int, monster*)':
src/field.cpp:1548:16: warning: enumeration value 'fd_gibs_flesh' not handled in switch [-Wswitch]
switch (cur->getFieldType()) {
^
src/field.cpp:1548:16: warning: enumeration value 'fd_gibs_veggy' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_slime' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_gas_vent' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_fire_vent' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_push_items' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_shock_vent' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_acid_vent' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_plasma' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_laser' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_blood_veggy' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_blood_insect' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_blood_invertebrate' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_gibs_insect' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_gibs_invertebrate' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_cigsmoke' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_weedsmoke' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_cracksmoke' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_methsmoke' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'fd_bees' not handled in switch [-Wswitch]
src/field.cpp:1548:16: warning: enumeration value 'num_fields' not handled in switch [-Wswitch]
src/field.cpp: In member function 'void map::field_effect(int, int)':
src/field.cpp:1847:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (fdmon != -1 && fdmon < g->num_zombies()) { //If there's a monster at (x,y)...
^
src/field.cpp:1853:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (fdnpc < g->active_npc.size() && !npc_inside) { //If there's an NPC at (x,y) and he's not in a covered vehicle...
^
src/field.cpp:1805:9: warning: enumeration value 'fd_null' not handled in switch [-Wswitch]
switch (cur->getFieldType()) { //Can add independent code for different types of fields to apply different effects
^
src/field.cpp:1805:9: warning: enumeration value 'fd_blood' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_bile' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_gibs_flesh' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_gibs_veggy' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_web' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_slime' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_acid' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_sap' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_sludge' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_fire' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_smoke' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_toxic_gas' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_tear_gas' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_nuke_gas' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_gas_vent' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_fire_vent' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_flame_burst' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_electricity' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_fatigue' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_push_items' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_shock_vent' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_acid_vent' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_plasma' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_laser' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_blood_veggy' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_blood_insect' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_blood_invertebrate' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_gibs_insect' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_gibs_invertebrate' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_cigsmoke' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_weedsmoke' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_cracksmoke' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_methsmoke' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_bees' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'fd_incendiary' not handled in switch [-Wswitch]
src/field.cpp:1805:9: warning: enumeration value 'num_fields' not handled in switch [-Wswitch]
g++ -DSDLTILES -DTILES -DLOCALIZE -Wall -Wextra -g -D_GLIBCXX_DEBUG --std=c++11 -MMD -c src/file_finder.cpp -o objwin/tiles/file_finder.o
src/file_finder.cpp: In static member function 'static std::__debug::vector<std::basic_string<char> > file_finder::get_files_from_path(std::string, std::string, bool, bool)':
src/file_finder.cpp:55:25: error: aggregate 'file_finder::get_files_from_path(std::string, std::string, bool, bool)::stat _buff' has incomplete type and cannot be defined
struct stat _buff;
^
src/file_finder.cpp:60:51: error: invalid use of incomplete type 'struct file_finder::get_files_from_path(std::string, std::string, bool, bool)::stat'
if( stat(root_file->d_name, &_buff) != 0x4 ) {
^
src/file_finder.cpp:55:20: error: forward declaration of 'struct file_finder::get_files_from_path(std::string, std::string, bool, bool)::stat'
struct stat _buff;
^
src/file_finder.cpp: In static member function 'static std::__debug::vector<std::basic_string<char> > file_finder::get_directories_with(std::__debug::vector<std::basic_string<char> >, std::string, bool)':
src/file_finder.cpp:121:25: error: aggregate 'file_finder::get_directories_with(std::__debug::vector<std::basic_string<char> >, std::string, bool)::stat _buff' has incomplete type and cannot be defined
struct stat _buff;
^
src/file_finder.cpp:126:51: error: invalid use of incomplete type 'struct file_finder::get_directories_with(std::__debug::vector<std::basic_string<char> >, std::string, bool)::stat'
if( stat(root_file->d_name, &_buff) != 0x4 ) {
^
src/file_finder.cpp:121:20: error: forward declaration of 'struct file_finder::get_directories_with(std::__debug::vector<std::basic_string<char> >, std::string, bool)::stat'
struct stat _buff;
^
make: *** [objwin/tiles/file_finder.o] Error 1
Just checking: you've got an updated MinGW, and have the -std=c++11 flag set? C++ 2011 compatibility has been giving people fits for a while now.
Yeah, replacing off64_t with _off64_thelped me to compile Terminal version
of game, but not Tiles version.
2014-07-31 2:19 GMT+03:00 KA101 [email protected]:
Just checking: you've got an updated MinGW, and have the -std=c++11 flag
set? C++ 2011 compatibility has been giving people fits for a while now.—
Reply to this email directly or view it on GitHub
https://github.com/CleverRaven/Cataclysm-DDA/issues/8201#issuecomment-50693741
.
std=c++11 is enabled (as you can see in the log) and I have the latest MinGW version (gcc version 4.8.1) .
It's c++11 compatibility with MinGW issue. You can use MinGW defined _stat (change all stat to _stat in code) or use this simple solution to force undefine __STRICT_ANSI__ (easy but extremely not safe):
1) Find --std=c++11 in your makefile
2) add -U__STRICT_ANSI__ after that
I think markdown ate something there, "change all stat to stat in code"
isn't sensical.
The strict ansi thing sounds very unappealing. We'd probably end up with
nasty hard to find bugs scattered all over.
Ok, similar issue. Pretty much exactly the same even. Fixed most of the stat related issues by adding the last line here to stat.h:
`#if !defined(_NO_OLDNAMES) && !defined(__STRICT_ANSI__)
Crude but effective. I'm pretty sure I could do the same with types.h and stick a definition in for off64_t. Both of these methods fill me with a certain amount of apprehension. What should I do? Step by step please. This hasn't gone well. Also, interestingly, it doesn't affect the zip download (which is missing a lot of stuff, most noticeably json files).
Could anyone confirm that this still an issue? (I'm asking that because there is no activity for two years and many things were changed during this period of time).
I haven't looked at this anymore. As far as I'm concerned, this issue is closed.
Most helpful comment
It's c++11 compatibility with MinGW issue. You can use MinGW defined _stat (change all stat to _stat in code) or use this simple solution to force undefine __STRICT_ANSI__ (easy but extremely not safe):
1) Find --std=c++11 in your makefile
2) add -U__STRICT_ANSI__ after that