in reply to Re^4: problem with par as other user
in thread problem with par as other user

Well well, interesting.. didn't know about those header files with the standard installable!

Running like "start tktest.pl" with this code:
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new; #centers window CenterWindow($mw, 300, 200); MainLoop; sub CenterWindow { my($window, $width, $height) = @_; #$window->idletasks; $width = $window->reqwidth unless $width; $height = $window->reqheight unless $height; my $x = int(($window->screenwidth / 2) - ($width / 2)); my $y = int(($window->screenheight / 2) - ($height / 2)); $window->geometry("=${width}x${height}+${x}+${y}"); }
displays the terminal aswell. I just unzipped your package and ran this. Else I love this solution! :)

And now I compiled but linking seems to give me:
...Temp/ccARbaaa.o(.text+0x44):start.c: undefined reference to `_imp__ +win32_malloc' ...Temp/ccARbaaa.o(.text+0x35a):start.c: undefined reference to `_imp_ +_win32_malloc' ...Temp/ccARbaaa.o(.text+0x435):start.c: undefined reference to `_imp_ +_win32_malloc' ...Temp/ccARbaaa.o(.text+0x4bf):start.c: undefined reference to `_imp_ +_RunPerl' ...Temp/ccARbaaa.o(.text+0x4d5):start.c: undefined reference to `imp(w +char_t, int, int, int, int, int, int, int, int, int, int, int, int, i +nt, int, int, int, int, int, int, int, int, int, int, int, int, int, +int, int, int, int, int, int, int, float, long double,...)(...)' collect2: ld returned 1 exit status Execution terminated
Ideas on this? :)

/ Ace

Replies are listed 'Best First'.
Re^6: problem with par as other user
by vkon (Curate) on Jun 29, 2006 at 22:16 UTC
    linker errors because you do not show perl58.lib file to linker?
      Wierd. Should work. All needed should be in that dir...C:\Perl\lib\CORE... I forgott to add the link to that lib for the linker, but this _should_ be working!

      gcc.exe "C:\test\start.c" -o "C:\test\start.exe" -I"C:\Dev-Cpp\include" -I"C:\Perl\lib\CORE" -L"C:\Perl\lib\CORE" -L"C:\Dev-Cpp\lib"

      Notive the -L"C:\Perl\lib\CORE" part. Also, the perl58.lib is there. Aswell as PerlEz.lib.
      Still no go though...

      Ace
        you should list perl58.lib in your command line?
        gcc.exe "C:\test\start.c" -o "C:\test\start.exe" -I"C:\Dev-Cpp\include +" -I"C:\Perl\lib\CORE" -L"C:\Perl\lib\CORE" -L"C:\Dev-Cpp\lib" perl58 +.lib

        And here's many information on using gcc for compiling modules with activestate perl here, on PM

Re^6: problem with par as other user
by vkon (Curate) on Jun 29, 2006 at 22:14 UTC
    on windows applications w/o console window could be:
    • for perl scripts, started with wperl (instead of perl)
    • for any "console"-based application to make it w/o console window you must once invoke the command
      editbin blablabla.exe /subsystem:windows

    Returning to your previous question, no, you do not required to build perl in order to build start.exe, and you can avoid building perl at all :):)

    ps English sorrey mine :)

      editbin?
        it comes with MSVC compiler, command-line utility, but probably available somehow else.
      Err, Windows got this start.com (or is it .exe?), and apparently I've been using that instead of your start.exe! Explains the terminal window. I renamed that to s.exe and then I got this message box about trying s.pl on 4 different locations (just as you expect looking in the start.c code...) However, isnt it supposed to run the thing given as argument?

      "s.exe tktests.pl" still says the same about not finding s.pl!

      I'm a little bit confused now...

      Update: Ofcource! I renamed this s.exe to tktests.exe. However, runing it didn't do anything. As nothing seems to be happening! :/ Hmm...
        I should have name it differently.

        But your tktests will not run anyway, because there's no perl/Tk in that package, only perl (strimmed. but you can populate PM files into .zip) and Tcl/Tk.

        Following code runs okay:

        use warnings; use strict; use Tcl::Tk; my $mw = Tcl::Tk::tkinit; #centers window CenterWindow($mw, 300, 200); Tcl::Tk::MainLoop; sub CenterWindow { my($window, $width, $height) = @_; #$window->idletasks; $width = $window->reqwidth unless $width; $height = $window->reqheight unless $height; my $x = int(($window->screenwidth / 2) - ($width / 2)); my $y = int(($window->screenheight / 2) - ($height / 2)); $window->geometry("=${width}x${height}+${x}+${y}"); }
        Try this out, it works for me...

        One more thing.

        There are console and "windows" mode editable by editbin. The problem is that w/o console you do not see error message (such as 'module Tk not found blablabla'), so I suggest you to try tests with console-based of executable

        Also you may want running applications from command line, so you need console version of executable again, see both at http://www.vkonovalov.ru/files-exchange/ cstart.exe and wstart.exe

        So try again with cstart.exe