Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The undefined references should be resolved by linking to the pthreads library.
Strawberry seems to provide pthreads - there's a c\x86_64-w64-mingw32\lib\libpthread.a which is probably the import library to which you should link.

I think the corrected version of the failing g++ -o ... command would have:
-L"C:\strawberry\c\x86_64-w64-mingw32\lib -lpthread"
inserted between the -lcomtl32 and the dll.exp.
You could 'cd' to the build directory and run by hand (copy'n'paste it in to the command line, then hit 'Enter') that *corrected* version of that failing command.
Then run dmake test and dmake install
Or you could find some other way of correcting the build procedure.

The strawberry mailing list could probably provide good help if all else fails.

Cheers,
Rob

UPDATE: I just tried the hack I suggested above, and it worked fine for me. (Note that my libpthread.a is in a different location to the OP's. Modify accordingly.)
C:\_64\strawberry518>cpan -i Imager::QRCode . . . g++.exe -o blib\arch\auto\Imager\QRCode\QRCode.dll -Wl,--base-file -Wl +,dll.base -mdll -s -L"C:\_64\strawberry518\perl\lib\CORE" -L"C:\_64\s +trawberry518\c\lib" src/bitstream.o src/mask.o src/mmask.o +src/mqrspec.o src/QRCode.o src/qrencode.o src/qrinput.o src/qrsp +ec.o src/rscode.o src/split.o C:\_64\strawberry518\perl\lib\C +ORE\libperl518.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -l +comdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -l +ws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp src/mqrspec.o:mqrspec.c:(.text+0x188): undefined reference to `pthread +_mutex_lock' src/mqrspec.o:mqrspec.c:(.text+0x19b): undefined reference to `pthread +_mutex_unlock' src/mqrspec.o:mqrspec.c:(.text+0x31c): undefined reference to `pthread +_mutex_lock' src/mqrspec.o:mqrspec.c:(.text+0x346): undefined reference to `pthread +_mutex_unlock' c:/_64/strawberry518/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../. +./../x86_64-w64-mingw32/bin/ld.exe: src/mqrspec.o: bad reloc address +0x0 in section `.pdata' c:/_64/strawberry518/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../. +./../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operat +ion collect2: ld returned 1 exit status dmake.EXE: Error code 129, while making 'blib\arch\auto\Imager\QRCode +\QRCode.dll' KURIHARA/Imager-QRCode-0.034.tar.gz C:\_32\strawberry514\c\bin\dmake.EXE -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible C:\_64\strawberry518>cd \Users\sisyphus\.cpan\build\Imager-QRCode-0.03 +4-agp6k1 C:\Users\sisyphus\.cpan\build\Imager-QRCode-0.034-AGp6k1>g++.exe -o bl +ib\arch\auto\Imager\QRCode\QRCode.dll -Wl,--base-file -Wl,dll.base -m +dll -s -L"C:\_64\strawberry518\perl\lib\CORE" -L"C:\_64\strawberry518 +\c\lib" src/bitstream.o src/mask.o src/mmask.o src/mqrspec. +o src/QRCode.o src/qrencode.o src/qrinput.o src/qrspec.o src/ +rscode.o src/split.o C:\_64\strawberry518\perl\lib\CORE\libperl5 +18.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -la +dvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr + -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -L"C:\_64\strawberr +y518\c\x86_64-w64-mingw32\lib" -lpthread dll.exp C:\Users\sisyphus\.cpan\build\Imager-QRCode-0.034-AGp6k1>dmake C:\_64\strawberry518\perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e +cp -- QRCode.bs blib\arch\auto\Imager\QRCode\QRCode.bs C:\_64\strawberry518\perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e +chmod -- 644 blib\arch\auto\Imager\QRCode\QRCode.bs C:\Users\sisyphus\.cpan\build\Imager-QRCode-0.034-AGp6k1>dmake test C:\_64\strawberry518\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" +"test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/00.load.t t/01.pl +ot.t t/00.load.t .. # Testing Imager::QRCode 0.034 t/00.load.t .. ok t/01.plot.t .. ok All tests successful. Files=2, Tests=5, 0 wallclock secs ( 0.05 usr + 0.03 sys = 0.08 CPU +) Result: PASS C:\Users\sisyphus\.cpan\build\Imager-QRCode-0.034-AGp6k1>

In reply to Re: Installing Imager::QRCode on windows 8 by syphilis
in thread Installing Imager::QRCode on windows 8 by shohn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-24 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found