4

When compiling Objective-C with GNUstep/MinGW I get the following error:

The procedure entry point __printf__ could not be located in the dynamic link library libintl-8.dll.

Windows 7/64-bit. File version on libintl-8.dll is 0.18.1.

Is the compiler using the right file?

Edit: here is the Exports table of the file at c:\MinGW\bin\libintl-8.dll

[Ordinal/Name Pointer] Table
        [   0] __printf__
        [   1] _get_output_format
        [   2] _nl_expand_alias
        [   3] _nl_explode_name
        [   4] _nl_find_domain
        [   5] _nl_find_msg
        [   6] _nl_language_preferences_default
        [   7] _nl_load_domain
         ...   ...

4 Answers 4

10

On my system, I fixed this by reordering my system PATH envvar so that c:\MinGW\bin would show up before %GTK_BASEPATH%\bin. That way, the correct libintl-8.dll that as.exe wanted would be found, even when GCC launches it from c:\MinGW\bin\mingw32\bin instead of c:\MinGW\bin. Otherwise, it would try to link against the one shipped with some GTK+ SDK which did not have all of the required symbols, I assume. Also, in my case, the dialog box complained that as.exe was missing the symbol when really the libintl-8.dll that the dynamic linker decided to try to use was at fault.

Too bad there aren’t more packages installable via mingw-get that actually share shared objects instead of each SDK shipping its own installer along with its own incompatible variants of the DLLs…

1
  • You are a genius, have lost 2 hours solving this! Nov 29, 2017 at 17:34
7

I do the same thing. Rename c:\mingw\mwingw32 to c:\mingw\mingw32old and it works (Windows XP). In Windows 7 64-bit I have not had this problem.

2
  • It would be lovely to know why this is necessary or if a more elegant fix is available. Aug 14, 2015 at 4:12
  • and also must run command prompt as administrator in windows 7 32-bit
    – josef
    Oct 21, 2020 at 18:41
4

I experienced a similar problem. In my case the error appeared in a dialog box, rather than in the console output from the compiler. This indicates that it's actually a problem with execution of the compiler, rather than with the compilation. Try adding -v to the gcc command to see what sub-commands its executing. In my case it was an issue with it trying to execute as.exe from MinGW/mingw32/bin instead of MinGW/bin (the libintl DLL doesn't exist in the former location). I renamed the MinGW/mingw32 folder to prevent it being found and the compilation succeeded. Not sure why it was looking in this location though.

Ultimately I fixed this by doing a fresh install of MinGW.

0

Here how it should be.

libintl-8.dll 0.8.1

Export Table:
  Name:                          libintl-8.dll
  Time Date Stamp:               0x4EA19844 (21.10.2011 17:05:24)
  Version:                       0.00
  Ordinal Base:                  1
  Number of Functions:           84
  Number of Names:               84

  Ordinal   Entry Point   Name
        1   0x00009124    __printf__
        2   0x000105B8    _get_output_format
        .   ...
5
  • Thanks for the response. But knowing how it should be doesn't tell me why the DLL included in the download/install package isn't the one the compiler wants or what I'm supposed to do about it.
    – Joe Davis
    Aug 23, 2013 at 18:43
  • This may sound crazy, but I notice that my objdump ordinals are zero-based and yours are not. Is it possible that there is an actual discrepancy, or is it a matter of how the tool displays the list?
    – Joe Davis
    Aug 23, 2013 at 19:24
  • @JoeDavis : Try and you will see : libintl-8.dll
    – moskito-x
    Aug 23, 2013 at 20:26
  • I replaced my file with yours and got the exact same error. Here's my build command: gcc -o helloworld.exe HELLOWORLD.m -I /GNUstep/GNUstep/System/Library/Headers -L /GNUstep/GNUstep/System/Library/Libraries -std=c99 -lobjc -lgnustep-base -fconstant-string-class=NSConstantString
    – Joe Davis
    Aug 23, 2013 at 22:13
  • @JoeDavis : for a simple Helloworld you usually do not need libintl . We can not see your code. And please put your build command in your question, not in a comment.
    – moskito-x
    Aug 24, 2013 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.