[MinGW-Notify] [mingw] #41049: A C++ program compiled with MinGW64 can't load libwinpthread-1.dll unless it isin the path, which it is when I built it but isn't when customers run it.

Back to archive index
MinGW Notification List mingw****@lists*****
Mon Dec 14 08:48:16 JST 2020


#41049: A C++ program compiled with MinGW64 can't load libwinpthread-1.dll unless it is
in the path, which it is when I built it but isn't when customers run it.

  Open Date: 2020-12-14 08:46
Last Update: 2020-12-14 08:48

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/41049
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41049

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2020-12-14 08:48 Updated by: wba2
 * Details Updated



---------------------------------------------------------------------
Ticket Status:

      Reporter: wba2
         Owner: (None)
          Type: Issues
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: (None)
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

The program below was cut way down from a much larger program that uses virtual
classes to use multiple user interface subsystems. My attempts to make it
statically bind libwinpthread-1.dll into the executable were unsuccessful.

MinGW64 was downloaded and installed on Nov 29, 2020. It's pedigree seems to be

Version 8.1.0 Architecture i686 Threads posix Exception dwarf Build revision 0
Original destination folder mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0

Tools pedigrees are: C:\wba\sd>gcc --version gcc (i686-posix-dwarf-rev0, Built
by MinGW-W64 project) 8.1.0

C:\wba\sd>ld --version GNU ld (GNU Binutils) 2.30

Program is

#include <stdio.h>

class iobase {

virtual void create_menu() = 0;

};

class iofull : public iobase {

void create_menu();

};

int main(int argc, char *argv[]) { printf("Hello, World!\n"); }

static char *call_menu_prompts;

void iofull::create_menu() { call_menu_prompts = new char50; }

Compile with

g++ -static-libgcc -static-libstdc++ -shared -o sdlib.dll
-Wl,--out-implib,libsdlib.a

g++ -static-libgcc -static-libstdc++ -O4 -c sdui-tty.cpp

g++ -static-libgcc -static-libstdc++ -mconsole -o sdtty.exe sdui-tty.o -L. -LC:
\MinGW64\mingw32 -lsdlib



-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/41049
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=41049



More information about the MinGW-Notify mailing list
Back to archive index