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

Hey!

Well, since this may be of more interest to more, I ask it here. What do I have to do minimum to get this start.c to compile properly? I've downloaded the source from Activestate and setup Dev-C++ to find the headers and libs. Now, when I compile I get this:
gcc.exe "C:\test\start.c" -o "C:\test\start.exe" -I"C:\Dev-Cpp\incl +ude" -I"C:\perl-5.8.8" -L"C:\Dev-Cpp\lib" -L"C:\perl-5.8.8\lib" In file included from C:\test\start.c:21: C:/perl-5.8.8/perl.h:37:23: config.h: No such file or directory In file included from C:\test\start.c:21: C:/perl-5.8.8/perl.h:1367: error: syntax error before "IV" C:/perl-5.8.8/perl.h:1367: warning: data definition has no type or sto +rage class C:/perl-5.8.8/perl.h:1368: error: syntax error before "UV" C:/perl-5.8.8/perl.h:1368: warning: data definition has no type or sto +rage class C:/perl-5.8.8/perl.h:1585: error: syntax error before "NV" C:/perl-5.8.8/perl.h:1585: warning: data definition has no type or sto +rage class C:/perl-5.8.8/perl.h:2065: error: syntax error before "STRLEN" C:/perl-5.8.8/perl.h:2065: warning: data definition has no type or sto +rage class In file included from C:/perl-5.8.8/perl.h:2120, from C:\test\start.c:21: C:/perl-5.8.8/handy.h:147: error: syntax error before "I8" C:/perl-5.8.8/handy.h:147: warning: data definition has no type or sto +rage class C:/perl-5.8.8/handy.h:148: error: syntax error before "U8" C:/perl-5.8.8/handy.h:148: warning: data definition has no type or sto +rage class C:/perl-5.8.8/handy.h:149: error: syntax error before "I16" C:/perl-5.8.8/handy.h:149: warning: data definition has no type or sto +rage class C:/perl-5.8.8/handy.h:150: error: syntax error before "U16" C:/perl-5.8.8/handy.h:150: warning: data definition has no type or sto +rage class C:/perl-5.8.8/handy.h:151: error: syntax error before "I32" C:/perl-5.8.8/handy.h:151: warning: data definition has no type or sto +rage class C:/perl-5.8.8/handy.h:152: error: syntax error before "U32" C:/perl-5.8.8/handy.h:152: warning: data definition has no type or sto +rage class C:/perl-5.8.8/handy.h:536: error: syntax error before "line_t" C:/perl-5.8.8/handy.h:536: warning: data definition has no type or sto +rage class C:/perl-5.8.8/perl.h:2435:21: win32.h: No such file or directory In file included from C:\test\start.c:21: C:/perl-5.8.8/perl.h:2695: error: syntax error before "I32" C:/perl-5.8.8/perl.h:2695: warning: no semicolon at end of struct or u +nion C:/perl-5.8.8/perl.h:2696: warning: data definition has no type or sto +rage class C:/perl-5.8.8/perl.h:2701: error: syntax error before '}' token C:/perl-5.8.8/perl.h:2710: error: syntax error before '*' token C:/perl-5.8.8/perl.h:2710: error: `I32' declared as function returning + a function C:/perl-5.8.8/perl.h:2710: error: 'I32' redeclared as different kind o +f symbol C:/perl-5.8.8/handy.h:151: error: previous declaration of 'I32' was he +re In file included from C:/perl-5.8.8/perl.h:2733, from C:\test\start.c:21: C:/perl-5.8.8/iperlsys.h:54: error: syntax error before '*' token C:/perl-5.8.8/iperlsys.h:54: error: `Signal_t' declared as function re +turning a function In file included from C:/perl-5.8.8/perl.h:2746, from C:\test\start.c:21: C:/perl-5.8.8/regexp.h:20: error: syntax error before "U8" C:/perl-5.8.8/regexp.h:20: warning: no semicolon at end of struct or u +nion C:/perl-5.8.8/regexp.h:21: warning: data definition has no type or sto +rage class C:/perl-5.8.8/regexp.h:22: error: syntax error before "next_off" C:/perl-5.8.8/regexp.h:22: warning: data definition has no type or sto +rage class .... And so forth...
I was hoping I wouldn't have to install M$ Visual Studio X. It seems that I have to do "configure" (to create the config.h file that is missing), but how to do this in windows? Would be damn cool if I could compile this start.c, since this little project seems really cool to me :) And besides, I need to add a pause in there to make it pause, and not close the terminal window when some tk script Im runing doesnt work. :) I get some error, but the window closes and I cant see the error. (Probably some module missing in this package that I use). Oh, and maybe somehow to get rid of the terminal window aswell when the tk script actually works!

But, I suppose the Perl interpreter is boundled into this start.c, and thus I need to be able to compile the whole Perl source aswell?

Thanks,
Ace

Replies are listed 'Best First'.
Re^4: problem with par as other user
by vkon (Curate) on Jun 29, 2006 at 14:37 UTC
    why you need to compile start.c, in the first place?

    Regarding compiling perl shipped with activestate with mingv, or free MS compiler, or else - please seek monastery, I remember many articles here.

    Regarding

    C:/perl-5.8.8/perl.h:37:23: config.h: No such file or directory
    You do not have to create config.h with configure. Config.h shipped with Perl and is inside its directory ./lib/CORE/*.h

    To get rid of terminal window - thats easy. Also, it should not show in the package that I've sent. On which step do you see them?

    Did you succeeded running perl-cd-blablabla, BTW??

    BR,
    Vadim.

      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
        linker errors because you do not show perl58.lib file to linker?
        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 :)