bugClanBomber - Bugs: bug #58920, Windows version

 
 

bug #58920: Windows version

Submitter:  Nerijus Baliunas <nerijus>
Submitted:  Sat 08 Aug 2020 08:50:11 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 08 Aug 2020 08:59:17 PM UTC, comment #1: 

BTW, with this patch Linux version does not compile:

MapEntry.cpp: In constructor ‘MapEntry::MapEntry(boost::filesystem::path, boost::filesystem::path)’:
MapEntry.cpp:48:49: error: conversion from ‘basic_string<char>’ to non-scalar type ‘basic_string<wchar_t>’ requested
   48 |   std::wstring map_name = filename.stem().native();

Nerijus Baliunas <nerijus>
Sat 08 Aug 2020 08:50:11 PM UTC, original submission:  

I crosscompiled 2.2.0 with mingw64. On Fedora 32 I used:
LIBS=-lws2_32 ./configure --host=x86_64-w64-mingw32 --with-boost=/usr/x86_64-w64-mingw32/sys-root/mingw
It compiled and linked without errors with this patch:

diff -ur clanbomber-2.2.0.orig/src/MapEntry.cpp clanbomber-2.2.0/src/MapEntry.cpp
--- clanbomber-2.2.0.orig/src/MapEntry.cpp      2017-10-31 22:19:19.000000000 +0200
+++ clanbomber-2.2.0/src/MapEntry.cpp   2020-08-08 22:41:35.347367272 +0300
@@ -45,7 +45,7 @@
   enabled = true;

   // extract map name
-  map_name = filename.stem().native();
+  std::wstring map_name = filename.stem().native();

   // is the file writable?
   if (access(path / filename, W_OK) == 0) {

Is the patch ok? Without it I got:

MapEntry.cpp: In constructor 'MapEntry::MapEntry(boost::filesystem::path, boost::filesystem::path)':
MapEntry.cpp:48:37: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'const string_type' {aka 'const std::__cxx11::basic_string<wchar_t>'})
   48 |   map_name = filename.stem().native();

The compiled exe runs, but closes right after displaying main window.

Nerijus Baliunas <nerijus>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nerijus (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code