I can't distribute a program compiled with MSYS2 !

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

I can't distribute a program compiled with MSYS2 !

eddie
Hi to all the MSYS community,

At first MSYS is the solution i have search for years fro making Windows  version from my programs, passing trough code-block-mingw32, mingw alone, cygwin,...

---

But i come to my problem:

I can compile and launching my program mmp-2.1 which is an update from the Micro Music Player which I have build for Linux, the update will soon release in the hope their will be a Windows version too.

:: extract from my Makefile

CXXFLAGS = -mwindows -O2 -std=c++11 # we can try -static-libstdc++ -static-libgcc -lstdc++ # but -lmingw32 make fail the build
 
LDFLAGS = `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libvlc`
 
LDFLAGS = `pkg-config --libs gtk+-3.0` `pkg-config --libs libvlc`


All success but when i come to distributing i heart to a wall:

I have make a folder outside from the MSYS installation, then copy all the dependencies, and finally copy the required *.dll files into my ./bin folder like this

::

    ldd ./bin/mmp | grep mingw64 | cp $(gawk '{print $3}') /path/to/test/dir/bin

And when i launch the program all works fine except the initialization from libvlc which always return NULL ???

::   
       
int
main (int argc, char *argv[]) {  

    // ...   libvlc_instance_t * libvlc_inst = libvlc_new (0, NULL) ;  
   
    if (libvlc_inst == NULL) {  
       
        fprintf(stderr,"The unborn is killed in the winbee !\n") ;
        exit(EXIT_FAILURE) ;
    }
 
   
     // ...   return 0 ;  

}           

Thanks for you answers about why my program works into the MSYS environment and not other way ?

I think the problem is the libvlc because the program start but libvlc doesn't initialize. 

--

3D imaging web-site: www.3dreaming-imaging.net
International web-site: www.open-source-projects.net

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: I can't distribute a program compiled with MSYS2 !

mathog
On 11-Jul-2016 15:06, eddie wrote:
> I think the problem is the libvlc because the program start but libvlc
> doesn't initialize.

Get "dependency walker" and have it look at your exe.  If it shows
libvlc
as missing, that is your problem.  Most often the solution is to drop
the
libwhatever.dll into the same directory as the exe file.  Sometimes
dependency walker will tell you that some other dll is needed which is
linked indirectly (another dll uses it).

If that other DLL is another C RTL library then check that none of these
are happening:

1.  pass a FILE * from one dll into the other and use the second one's
fprintf() or any other standard IO function.
2.  malloc() memory in one, free() in the other.
3.  strtok() started in one, then run in the other.  (This is highly
unlikely.)
4.  setjmp/longjmp used by both dlls.

There are probably other functions that could cause problems.  What all
of these have in common is that the RTL dll stores a bunch of
information internally and returns a pointer or other reference to it.  
If the other dll tries to use this pointer or other reference it will
find that it does not have correspond to its internal information, and
bad things will happen.  Yes, it is a bad idea to link to more than one
C RTL - but it can be hard to avoid it in some instances.

Regards,

David Mathog
[hidden email]
Manager, Sequence Analysis Facility, Biology Division, Caltech

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: I can't distribute a program compiled with MSYS2 !

Keith Marshall
In reply to this post by eddie
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/07/16 23:06, eddie wrote:
> Hi to all the MSYS community,
>
> At first MSYS is the solution i have search for years fro making
> Windows  version from my programs, passing trough
> code-block-mingw32, mingw alone, cygwin,...

Here you say MSYS, (which we *do* support here), but your subject line
says MSYS2; which is it?  MSYS2 is *not* MSYS; we do not support it here
.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXhCsaAAoJEMCtNsY0flo/5BIP/RgnkYRZO0/CKWf/ZOuRB1pS
L7sL0+oVscaAnVMAfaeW/vNUBrTrqewIWWRaLpRBKk9UOfOBJbzGgeR13sThwj1z
gNUpwPmfBf6xfnVkJqZtNRuc/cpovTtbGOy0G9Aev3JYzIIWvwl1gE0g1OdIYBnt
OFR4hUV4kZVyTyKxact+vHMMqupe0kGkrkKN0cCFs4ozAwN/vLSPOdyq6KsM7uPB
LenUwnqrc7TO1dkqWCFPmGBJPOCU4acrGVyT64C+ItoxnZgl8wSadVmp1WgiIN3q
chpkWIwnPbeP5XEunOmE/WOd65Kdw9DuoRnxUu053+Uwmd4X9jCvw8clOf4fPEY4
n3MEc3U44cWd2/XRvm7/Ov41UFkULiEKz/0CukvH8U0YKbZlJWIOUq1rCTHAX6Gc
jdLFwCLlLpxTPWvvqxEyQzSG5gzSh2iuw2WpLVPXA6LwWXJy0xjlCWPTIzmtwFbl
XM3pVvqWr3X9rLLAYCwTt4fRWDap4VsV6akwzH8UeYcZL1d1xVoGstlg2bzelKHB
+2lL3rRaG4zuU+EfO+GIbM9X2gEmroCMrcPH+DHBZph6QiQAWPqPsilr+YWWj258
NV1xG1fYvkTD8y/qJWdZ+EDsEFHmtnRyxM6VpIxHv5ZwwPnmltnBM+1XketmCQCJ
yqFPTGzkvgfWA2mS2HEQ
=d8HD
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: I can't distribute a program compiled with MSYS2 !

eddie
Sorry for the mistake but I confirm I use *MSYS2*.

On 12/07/2016 01:26, Keith Marshall wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/07/16 23:06, eddie wrote:
Hi to all the MSYS community,

At first MSYS is the solution i have search for years fro making 
Windows  version from my programs, passing trough
code-block-mingw32, mingw alone, cygwin,...
Here you say MSYS, (which we *do* support here), but your subject line
says MSYS2; which is it?  MSYS2 is *not* MSYS; we do not support it here
.

- -- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXhCsaAAoJEMCtNsY0flo/5BIP/RgnkYRZO0/CKWf/ZOuRB1pS
L7sL0+oVscaAnVMAfaeW/vNUBrTrqewIWWRaLpRBKk9UOfOBJbzGgeR13sThwj1z
gNUpwPmfBf6xfnVkJqZtNRuc/cpovTtbGOy0G9Aev3JYzIIWvwl1gE0g1OdIYBnt
OFR4hUV4kZVyTyKxact+vHMMqupe0kGkrkKN0cCFs4ozAwN/vLSPOdyq6KsM7uPB
LenUwnqrc7TO1dkqWCFPmGBJPOCU4acrGVyT64C+ItoxnZgl8wSadVmp1WgiIN3q
chpkWIwnPbeP5XEunOmE/WOd65Kdw9DuoRnxUu053+Uwmd4X9jCvw8clOf4fPEY4
n3MEc3U44cWd2/XRvm7/Ov41UFkULiEKz/0CukvH8U0YKbZlJWIOUq1rCTHAX6Gc
jdLFwCLlLpxTPWvvqxEyQzSG5gzSh2iuw2WpLVPXA6LwWXJy0xjlCWPTIzmtwFbl
XM3pVvqWr3X9rLLAYCwTt4fRWDap4VsV6akwzH8UeYcZL1d1xVoGstlg2bzelKHB
+2lL3rRaG4zuU+EfO+GIbM9X2gEmroCMrcPH+DHBZph6QiQAWPqPsilr+YWWj258
NV1xG1fYvkTD8y/qJWdZ+EDsEFHmtnRyxM6VpIxHv5ZwwPnmltnBM+1XketmCQCJ
yqFPTGzkvgfWA2mS2HEQ
=d8HD
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: [hidden email]


--
3D imaging web-site: www.3dreaming-imaging.net
International web-site: www.open-source-projects.net

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: I can't distribute a program compiled with MSYS2 !

Keith Marshall
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/07/16 09:18, eddie wrote:
> Sorry for the mistake but I confirm I use *MSYS2*.

Which makes your enquiry completely off-topic for this list; sorry,
but you need to find an MSYS2 support list, or forum, to ask this.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJXhLKrAAoJEMCtNsY0flo/n5wQAL3talc/Sb9ZVOgTpzbh3cSR
a3w77uHIxUQTZPDrg5Qxzn80/DE3DeP9Z6hzvO+3oG1qfXIRS4ad26sVXLNiL7Ic
W94JfUc5vx0lGSBBqv0NYJ9x+UsP/OdvoCgcH8zPilq4nEtoz24dju5bwK1oy49D
oxse/XWqNpwqStcfCg03sUNPiUBeuSt7E+yCMag2JFu594iuym2gs5iFQ9WUDBET
JLkOPKJP94DG6L/avnd02wma1SK1ZIWbJA7pgvR2aMSj5Onj6wgNi3F+dz/hEtLX
GonUPiS9r7IzKshSBiiCFNEp8VU4PBe1drILfUJJNC0DAf9tOwADHEqc2WuS2lK6
7zFVASM/zS2P9MTZ6HTBZ/JpYdiytJywjn1ZUsab2j9wmdXJnAYDZnkUL/MCXd+V
MBkjr3XHi5v6aqjaqTgf1TcWaEdW+Edyj8Is2Fw0EkU/VQf5SZODPD+Yun8KM1BQ
DeHHrxHsPB+u9uN1mPK8jZ2vhjIGvBi8P+CwFY40h0u8jMASHaLZQBBkfgeUBDmi
CCSkxXqED5xU1TWH2bNz67iaQS9PFlO0r5vWxvIAT4ky1kFQNFPoiXDt9iOhMAbL
damMrxkLl6wXfkQy2fWkeUNO82p3KqcVLD973PVQc7tP4uQvCbGYBh94vl+S79Sx
s3kVQFDZ+jR6Cs/CJ0io
=IZyT
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe