Discussion:
Problems with libintl-8
John Coppens
2009-10-22 15:53:21 UTC
Permalink
Hello all,

Before sending me to FAQs etc, I have read probably most of them...
And many other mails etc.

I was finally able to compile a Linux program of mine for use of my
students (the few I didn't convert yet), and, after quite a bit of work,
got there.

When I run the program from Windows, I get a complaint that
'libintl-8.dll' is not found. It _is_ in \cygwin\bin - just in case, I
reinstalled it from setup.exe (Yesterday's version), same luck.
Just to be sure, I also reinstalled the entire Cygwin package with the
newer setup. Same thing.

I don't know how Windows would find the .dll in \cygwin\bin - which is
the mechanism? Don't I have to copy the dlls to \window\whatever? Or is
there some path coded in the .exe?

Help please.
John
Corinna Vinschen
2009-10-22 16:00:08 UTC
Permalink
Post by John Coppens
I don't know how Windows would find the .dll in \cygwin\bin - which is
the mechanism? Don't I have to copy the dlls to \window\whatever? Or is
there some path coded in the .exe?
Help please.
John
http://msdn.microsoft.com/en-us/library/ms682586%28VS.85%29.aspx


Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
John Coppens
2009-10-22 16:29:57 UTC
Permalink
On Thu, 22 Oct 2009 18:00:08 +0200
Post by Corinna Vinschen
Post by John Coppens
Help please.
John
http://msdn.microsoft.com/en-us/library/ms682586%28VS.85%29.aspx
Thanks Corinna!

I couldn't find any other solution, so I copied cygintl-8.dll
to /usr/local/bin (which is where my program installed, and where
Windows always looks it seems.). Now the program doesn't complain about
the missing dll anymore, but the application window appears and disappears
immediately.

Maybe something is wrong with the X window install.

Cheers,
John
Charles Wilson
2009-10-22 16:49:28 UTC
Permalink
Post by John Coppens
I couldn't find any other solution, so I copied cygintl-8.dll
to /usr/local/bin (which is where my program installed, and where
Windows always looks it seems.).
This is usually a very bad idea. If I release an updated version of
cygintl-8.dll (say, with a bugfix but no API change), that would only
update the one in C:\cygwin\bin, but you'd still have the old (buggy?)
version in /usr/local/bin. This could cause errors and/or confusion.
They don't call it DLL Hell for nothing.

Changing the PATH, as Corinna suggested, is usually the best approach.

NOTE: on Vista the My Computer->Properties->Advanced System Settings
approach may not work: that only lets you set:

The global system PATH
The Administrator user's PATH

Instead, for "regular" users, each one should go into Control
Panel->User Accounts->Change My Environment Variables.
See
http://www.question-defense.com/2009/06/22/modify-a-users-path-in-windows-vista-vista-path-environment-variable/
Post by John Coppens
Now the program doesn't complain about
the missing dll anymore, but the application window appears and disappears
immediately.
Maybe something is wrong with the X window install.
Can't help you, there.

--
Chuck

Dave Korn
2009-10-22 16:40:38 UTC
Permalink
Post by John Coppens
When I run the program from Windows, I get a complaint that
'libintl-8.dll' is not found. It _is_ in \cygwin\bin - just in case, I
reinstalled it from setup.exe (Yesterday's version), same luck.
Are you sure you copied that error message completely 100% accurately? The
filename ought to be "cygintl-8.dll", not "libintl-8.dll".
Post by John Coppens
Just to be sure, I also reinstalled the entire Cygwin package with the
newer setup. Same thing.
I don't know how Windows would find the .dll in \cygwin\bin - which is
the mechanism? Don't I have to copy the dlls to \window\whatever? Or is
there some path coded in the .exe?
The full gory details are at that link in the other reply, but probably the
quickest and simplest answer for you is to add the cygwin bin dir to your PATH
settings in the windows environment variables.

I'm assuming that you're trying to start the program from cmd.exe or by
double-clicking in explorer, rather than from a cygwin shell. If you're
getting this error when you try and launch the executable from a shell,
something else is wrong.


cheers,
DaveK
Charles Wilson
2009-10-22 16:43:12 UTC
Permalink
Post by John Coppens
When I run the program from Windows, I get a complaint that
'libintl-8.dll' is not found. It _is_ in \cygwin\bin - just in case, I
reinstalled it from setup.exe (Yesterday's version), same luck.
"libintl-8.dll" should NOT be in \cygwin\bin -- and a cygwin-compiled
application should not be looking for it. The *cygwin* version of the
i18n library is "cygintl-8.dll", which is found in the "libintl8"
package. I'm assuming this was simply a typo...if not, then you've
somehow picked up a mingw version of the i18n library.
Post by John Coppens
Just to be sure, I also reinstalled the entire Cygwin package with the
newer setup. Same thing.
I don't know how Windows would find the .dll in \cygwin\bin - which is
the mechanism?
Windows uses the following algorithm to find DLLs:
1. look in the same directory as the .exe
2. look in the current directory
3. look in the windows system directory (C:\Windows\system32\)
4. look in the windows directory (C:\Windows)
5. look in each of the directories in the PATH
Applications compiled using vis-studio 2005 or newer also can use binary
manifests compiled in to the .exe that explicitly specify certain other
information used to located DLLs; also, certain registry keys can affect
the search path.

But the important bits, for you, are items #1 and #5:

if you install your exe into C:\cygwin\bin, then it should work.

Or, if you set your PATH variable (My Computer->Properties->Advanced
System Settings [*]) so that it includes C:\cygwin\bin, that would work
also.

You could even exploit #2 by creating a Windows Shortcut to your
executable, but set the Start In directory of the shortcut to C:\cygwin\bin.
Post by John Coppens
Don't I have to copy the dlls to \window\whatever?
No, no, no, a thousand times no! Application programs should never
clutter C:\Windows...
Post by John Coppens
Or is there some path coded in the .exe?
Not for cygwin (see vis studio note, above).

--
Chuck
Loading...