#384 mingw64 (Win32 or Win64) with a w32 target does not link to normaliz.dll

v1.0 (example)
closed
Jonathan Yong
None
7
2014-03-11
2014-03-10
Jeremy Clarkson
No

mingw64 (Win32 or Win64) with a w32 target does not link to normaliz.dll.

normaliz.dll exported functions:
NormalizeString, IsNormalizedString, IdnToAscii, IdnToNameprepUnicode, IdnToUnicode

Using Win32:
gcc (Built by MinGW-W64 project) 4.8.2 20131009 (prerelease)
gcc testnormaliz.c -lnormaliz
C:\Temp\tempfile.o:testnormaliz.c:(.text+0xd1): undefined reference to IdnToNameprepUnicode
C:\Temp\tempfile.o:testnormaliz.c:(.text+0x11c): undefined reference to IdnToAscii
collect2.exe: error: ld returned 1 exit status

Using Win64, target w32
gcc (x86_64-win32-sjlj, Built by MinGW-W64 project) 4.8.2
gcc -m32 testnormaliz.c -o testnormaliz -lnormaliz
same linker error as above Win32.

Using Win64, target w64
gcc (x86_64-win32-sjlj, Built by MinGW-W64 project) 4.8.2
gcc testnormaliz.c -o testnormaliz -lnormaliz
compiles without error

Attached is the C program used in the tests.

1 Attachments

Discussion

  • Jonathan Yong
    Jonathan Yong
    2014-03-11

    Use -D_WIN32-WINNT=0x0600 -DWINVER=0x0600.

     
  • Jonathan Yong
    Jonathan Yong
    2014-03-11

    • status: open --> closed
    • assigned_to: Jonathan Yong