Re: Compiling Tk under Windows
by PodMaster (Abbot) on Jun 29, 2005 at 08:17 UTC
|
I'm not sure whats the problem... Can anyone help me? Greez, Giase
For whatever reason, perl (and your compiler) can't find those libraries (probably harmless should read probably harmfull).
You probably forgot to setup up your enviroment properly (call vcvars32.bat). Compare %lib%, %include%, and %path% before and after (calling vcvars32), you'll notice the difference.
Read
Tutorials =>
A Practical Guide to Compiling C based Modules under ActiveState using Microsoft C++
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | | ** The third rule of perl club is a statement of fact: pod is sexy. |
| [reply] [d/l] |
|
|
I tried to call vcvars32.bat, but had the same problem.
I have to give additional information to you i think:
I compiled perl with 'mingw' and 'dmake', because i want to use a module (Tk::WinPrint) which only compiles with the mingw environment. (The coder of the module told me).
The libs are installed on my system in the MS Visual Studio 6 -path.
But if i hadn't installed MSVC6 I won't have them.
Shouldn't this libs come with mingw, too???
I tried to copy them to the windows/system32-directory but the problem was still there...
| [reply] |
|
|
vcvars32, like the tutorial explains, comes with the microsoft compiler.
Regardless of what compiler you use, if perl is looking for some .lib, your compiler is also,
and it has to be able to find it, which is generally does by examining the INCLUDE/LIB enviroment variables (which is what vcvars32 sets).
Shouldn't this libs come with mingw, too???
I don't know, but if the perl you compiled with MinGW is looking for them now,
that means that you should already have them, otherwise you could not have compiled perl as you claim to have done.
I tried to copy them to the windows/system32-directory but the problem was still there...
Thats probably because windows/system32 is not in your %LIB%, just like that directory you copied them from.
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | | ** The third rule of perl club is a statement of fact: pod is sexy. |
| [reply] |
|
|
|
|
|
|
|
| [reply] |
|
|
|
|
|
|
|
|
|
Re: Compiling Tk under Windows
by Courage (Parson) on Jun 29, 2005 at 07:46 UTC
|
you're probably missing those libs, indeed.
Need more details to advice further. But, as you said, you're newbie, why re-compiling stuff, then, and not just use precompiled binaries?
Also, Tk is large and compiling it could be difficult. Try compiling Tcl and then install Tcl::Tk, those two CPAN modules could be used instead of Tk with very similar functionality. You'll gain much more flexibility with less efforts spent... | [reply] |
|
|
Isn't there a Perl/Tk package with ppm?
| [reply] |
Re: Compiling Tk under Windows
by anonymized user 468275 (Curate) on Jun 29, 2005 at 07:47 UTC
|
The advantage of Linux is that it maintains track of its dependencies, especially important for shared libraries. On windows, DLLs (dynamic link libraries) fill in the gaps like a big ball of mud. First search for other DLLs to see where they are normally kept on your system (varies for different Windows) - check the code to see where it expects to find them and extend the list of search paths if necessary. Sometimes DLLs are spread around in the wrong places and have to be collected together in (for example) the Windows\System32 directory. Failing that, for those that are really missing, you may have to hunt the internet for those you don't have installed.
| [reply] |
Re: Compiling Tk under Windows
by giase (Novice) on Jun 29, 2005 at 09:41 UTC
|
I tried to call vcvars32.bat, but had the same problem.
I have to give additional information to you i think: I compiled perl with 'mingw' and 'dmake', because i want to use a module (Tk::WinPrint) which only compiles with the mingw environment. (The coder of the module told me).
The libs are installed on my system in the MS Visual Studio 6 -path. But if i hadn't installed MSVC6 I won't have them.
Shouldn't this libs come with mingw, too??? I tried to copy them to the windows/system32-directory but the problem was still there... | [reply] |
|
|
so dmake still doesn't even know to look in system32 - doesn't it have a dmake.ini file where you can tell it where to look for the dlls?
| [reply] |
|
|
So you mean perl doesn't find this libraries because dmake doesn't find them?
I have no dmake.ini or something...
Where can I tell dmake to search for libraries?
Best, Giase
| [reply] |
Re: Compiling Tk under Windows
by spurperl (Priest) on Jun 29, 2005 at 14:56 UTC
|
I might be missing something here, but *why* do you have to compile Tk under WindowsXP ?
The ActivePerl distribution by ActiveState is free, stable and up-to-date. It comes with a pre-compiled and very well working Tk, right there for you to use. A simple install, no compilation. | [reply] |
Re: Compiling Tk under Windows
by anonymized user 468275 (Curate) on Jun 29, 2005 at 12:37 UTC
|
If it's perl that can't find the libs, rather than dmake, try assigning the environment variable PERL5LIB to a list of paths for it to search for DLLs - each path separated by ':'
| [reply] |
|
|
The environtment variable PERL5LIB doesn't exist, so I created it.
But there is still the old problem...
Where else can i tell perl to search for dlls?
p.s.: Guess you meant ';' for path-separation?!
| [reply] |
|
|
oops yes - sry I mean semicolons - lol u can see I am a mainly a unix programmer
| [reply] |
|
|
unfortunately that advice was wrong, search elsewhere: you need to tune up your C compiler and/or make
| [reply] |
|
|
PERL5LIB does not related to problem in question, C compiler tries to find C libraries, not Perl ones...
| [reply] |
Re: Compiling Tk under Windows
by giase (Novice) on Jun 29, 2005 at 13:04 UTC
|
How can I tell perl where to search for Libs? | [reply] |
|
|
Not to spoil your fun, but the Activestate Perl distribution is precompiled and runs just fine. Precompiled Perl, TK, and a good portion of CPAN. If you're compiling because you like to, then continue having fun. But if you're compiling Perl and TK because you come from Unix and think that's the best way to go, I suggest having a look at http://activestate.com/Products/ActivePerl/?mp=1
Cheers
| [reply] |
Re: Compiling Tk under Windows
by giase (Novice) on Jun 30, 2005 at 05:22 UTC
|
As i mentioned above, I need a Module for Windows (Tk::WinPrint) which doesn't compile with ActiveState or other precompiled binaries for windows.
The whole sh.. just because of this little Module I need...
Or does someone know how to print the MainWindow under Windows?? (WinPhoto doesn't work for Windows)
Greetz, Giase | [reply] |