Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Perl & borland 5.5 C/C++ Compiler

by tachyon (Chancellor)
on Aug 24, 2004 at 12:31 UTC ( [id://385375]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl & borland 5.5 C/C++ Compiler
in thread Perl & borland 5.5 C/C++ Compiler

Actually my suggestion to use cl.exe is possibly valid, but simply based on the fact that IMHO it works better so I use it. With cl.exe come the header and library files you need to link apps under windows. These are of course the M$ versions. When you get BCC you get Borlands take on these files, which IME have issues. Windows has issues period, but you get less using the M$ native compiler, headers and libs.

*However* if you had read my post properly you would have noted that the minimum flags case includes -DWIN32 which you fail to do......if I leave it out it chokes as we will be trying to compile non win32 code (well skipping the kludges - or whatever). The errors are slightly different but I suggest it might work if you add that define.

C:\>cl.exe -DWIN32 -I"D:\Perl\lib\CORE" D:\Perl\lib\CORE\perl56.lib -o + interp.exe interp.c Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.00.9466 for 80 +x86 Copyright (C) Microsoft Corporation 1984-2001. All rights reserved. interp.c Microsoft (R) Incremental Linker Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. /out:interp.exe /out:interp.exe D:\Perl\lib\CORE\perl56.lib interp.obj # all is well but without the define...... C:\>cl.exe -I"D:\Perl\lib\CORE" D:\Perl\lib\CORE\perl56.lib -o interp. +exe interp.c Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.00.9466 for 80 +x86 Copyright (C) Microsoft Corporation 1984-2001. All rights reserved. interp.c D:\Perl\lib\CORE\perl.h(803) : warning C4273: 'win32_strerror' : incon +sistent dll linkage d:\Perl\lib\CORE\dosish.h(111) : warning C4005: 'Stat' : macro redefin +ition d:\Perl\lib\CORE\win32.h(306) : see previous definition of 'St +at' D:\Perl\lib\CORE\perl.h(1754) : error C2061: syntax error : identifier + 'perl_os_thread' D:\Perl\lib\CORE\perl.h(1754) : error C2059: syntax error : ';' D:\Perl\lib\CORE\perl.h(1755) : error C2061: syntax error : identifier + 'perl_mutex' D:\Perl\lib\CORE\perl.h(1755) : error C2059: syntax error : ';' D:\Perl\lib\CORE\perl.h(1756) : error C2061: syntax error : identifier + 'perl_cond' D:\Perl\lib\CORE\perl.h(1756) : error C2059: syntax error : ';' D:\Perl\lib\CORE\perl.h(1757) : error C2061: syntax error : identifier + 'perl_key' D:\Perl\lib\CORE\perl.h(1757) : error C2059: syntax error : ';' d:\Perl\lib\CORE\perl.h(2245) : warning C4273: 'win32_crypt' : inconsi +stent dll linkage d:\Perl\lib\CORE\perl.h(2355) : warning C4273: 'win32_environ' : incon +sistent dll linkage d:\Perl\lib\CORE\perlvars.h(22) : error C2061: syntax error : identifi +er 'PL_thr_key' d:\Perl\lib\CORE\perlvars.h(22) : error C2059: syntax error : ';' d:\Perl\lib\CORE\perlvars.h(39) : error C2061: syntax error : identifi +er 'PL_op_mutex' d:\Perl\lib\CORE\perlvars.h(39) : error C2059: syntax error : ';' C:\>

cheers

tachyon

Replies are listed 'Best First'.
Re^4: Perl & borland 5.5 C/C++ Compiler
by blm (Hermit) on Aug 24, 2004 at 13:09 UTC

    I DID read your post

    Thanks :-) now I know -DWIN32 is important

    C:\>bcc32 -tWD -DWIN32 -I"c:\perl\lib\CORE" -L"C:\borland\bcc55\lib" + C:\perl\ lib\CORE\perl58.lib C:\borland\bcc55\lib\import32.lib C:\borland\bcc55 +\lib\cw32m ti.lib perl_inc.c Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland perl_inc.c: Warning W8070 perl_inc.c 14: Function should return a value in functio +n main Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland C:\>
    But you didnt say anywhere in your post that this was a problem you just added it silently ;-)
    # Essentially we pass all the same -D defines that perl was built with + plus # the include dir to find the perl headers and the perl56.lib binary w +hich is # what where the real functions defined in the headers are found and w +hat we # will be linking against........
    And this is what I did. There is no -DWIN32 in: perl -MExtUtils::Embed -e ccopts -e ldopts Which is what everyone was saying Nalina use. I personally dont think that it is possible for everyone to use cl.exe

    ps Please stop down voting me now. I was only trying to help. There was no malice.

      First I actually gave you a ++ as your point was perfectly valid and I was far to lazy to try to get Borland to work (been there before). Someone downvoted every post on this node for whatever reason (just noted on update). Not my malice I'm afraid. But just to pick nits about the define. It is there, and must be there in your Borland compile. I have resorted to syntax highlighing ;-)

      C:\>perl -MExtUtils::Embed -e ccopts -e ldopts
      -tWD  -L"c:\perl\lib\CORE"  -L"C:\borland\bcc55\lib" -Gn  C:\perl\lib\CORE\perl58.lib 
      C:\borland\bcc55\lib\import32.lib C:\borland\bcc55\lib\cw32mti.lib
      -O2 -D_RTLDLL -DWIN32 -DHAVE_DES_FCRYPT -D_MT -D__USELOCALES__ -D_WIN32_WINNT=0
      x0410 -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS  -I"C:\perl\lib\CORE"
      C:\>
      
      

      cheers

      tachyon

        Yep I need glasses. My bad. :-). I thought I copied and pasted. Oh well.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://385375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-22 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found