in reply to libintl.a for Strawberry Perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: libintl.a for Strawberry Perl
by fdesar (Beadle) on Jan 24, 2019 at 14:25 UTC | |
Great: I finally found it as you said in in MSYS2: libintl.a (and libintl.h too) But that doesn't seem sufficient: when I compile and link a simple program calling gettext(), I get a linking error : Program:
Compiling:
I'm puzzled for now... BTW, the module I want to get working is Locale::gettext which does exactly what I need under Linux and macOS. I tried the Gido's pure Perl version of Locale::gettext_pp but his code doen't understand the windows pseudo-locale so it doesn't work. PS: before, I hated Windows but I think now I abhor it! :-( | [reply] [d/l] [select] |
by VinsWorldcom (Prior) on Jan 24, 2019 at 21:30 UTC | |
Your problem is the supplied library from Developer Files is in 32-bit format and your using 64-bit Strawberry Perl; and thus, 64-bit gcc. Your test program above compiles fine for me with Strawberry 5.18 32-bit:
Try a 32-bit Perl (and thus 32-bit gcc) or try the following. Using your existing 64-bit Strawberry (and thus 64-bit gcc), from a cmd.exe prompt in the directory where you unzip both the Developer files (from above) link and the Binaries
The above worked for me - creating my own 64-bit libintl.a from the provided libintl3.dll and then compiling test.exe linking that created libintl.a | [reply] [d/l] [select] |
by fdesar (Beadle) on Jan 25, 2019 at 10:46 UTC | |
| [reply] |
by fdesar (Beadle) on Jan 25, 2019 at 10:16 UTC | |
Many thanks! | [reply] |
by fdesar (Beadle) on Jan 25, 2019 at 16:11 UTC | |
OK, now I can compile Locale::gettext correctly. But unfortunatly, the gettext.xs.dll it builds up won't load. I used the Strawberry portable Perl 64 with the standard build method (as cpan fails) by downloading the module and doing perl Makefile.PL; gmake to generate it. And it fails on gmake test. If I ldd gettext.xs.dll, I find it has some unknown unresolved references:
but "???" doesn't really help to identify the problem. I suspect it still has something to do with 32bit vs 64bit but don't really know what to do next. Searching... :-) I think the two unknown references should have been:
Here is the log of gmake in case it could help:
| [reply] [d/l] [select] |
by syphilis (Archbishop) on Jan 26, 2019 at 06:51 UTC | |
by bliako (Abbot) on Jan 26, 2019 at 11:10 UTC | |
by bliako (Abbot) on Jan 24, 2019 at 16:10 UTC | |
Try gcc -o test test.c -lintl assuming libintl.* is in the libraries search path, alternatively tell gcc where to find it using -L blahblahlocation | [reply] [d/l] [select] |
by fdesar (Beadle) on Jan 24, 2019 at 18:18 UTC | |
I even tried:
with the same result. But when I try to link with the libintl.a itself, I get a very different result:
It seems another peace of code is missing (glibc maybe ? I'll have a look in MSY2 to see that)... But I still don't understand why the gcc -o test -lintl -I. test.c with libintl.a in the current directory doesn't work... | [reply] [d/l] [select] |
by fdesar (Beadle) on Jan 24, 2019 at 19:28 UTC | |
| [reply] |
by bliako (Abbot) on Jan 24, 2019 at 20:54 UTC | |