c/pascal compiler differences

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Skybuck Flying

    #16
    Re: c/pascal compiler differences


    "Maarten Wiltink" <maarten@kitten sandcats.net> wrote in message
    news:412b25ec$0 $43451$e4fe514c @news.xs4all.nl ...[color=blue]
    > "Skybuck Flying" <nospam@hotmail .com> wrote in message
    > news:cgf5n2$fk3 $1@news5.tilbu1 .nb.home.nl...[color=green]
    > > "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
    > > news:kerWc.8453 $DG.428478@news 20.bellglobal.c om...[/color]
    >[color=green][color=darkred]
    > >> It helps to read the documentation. I gave you a specific reference,[/color][/color]
    >[color=green]
    > > Huh ? What reference ? :) No you didn't :)[/color]
    >
    > "See the External Declarations entry in the Delphi help. Pay particular
    > attention to the $LINK compiler directive."
    >
    > My baby nieces have a longer attention span, and they listen better, too.[/color]

    Dude, really, I already know that part of the help file, you're boring me :D

    $LINK directive is boring :D


    Comment

    • Maarten Wiltink

      #17
      Re: c/pascal compiler differences

      "Skybuck Flying" <nospam@hotmail .com> wrote in message
      news:cggg7h$970 $1@news3.tilbu1 .nb.home.nl...[color=blue]
      > "Maarten Wiltink" <maarten@kitten sandcats.net> wrote in message
      > news:412b25ec$0 $43451$e4fe514c @news.xs4all.nl ...[color=green]
      >> "Skybuck Flying" <nospam@hotmail .com> wrote in message
      >> news:cgf5n2$fk3 $1@news5.tilbu1 .nb.home.nl...[color=darkred]
      >>> "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
      >>> news:kerWc.8453 $DG.428478@news 20.bellglobal.c om...[/color][/color][/color]
      [color=blue][color=green][color=darkred]
      >>>> It helps to read the documentation. I gave you a specific reference,[/color]
      >>[color=darkred]
      >>> Huh ? What reference ? :) No you didn't :)[/color]
      >>
      >> "See the External Declarations entry in the Delphi help. Pay particular
      >> attention to the $LINK compiler directive."
      >>
      >> My baby nieces have a longer attention span, and they listen better, too.[/color]
      >
      > Dude, really, I already know that part of the help file, you're boring
      > me :D
      >
      > $LINK directive is boring :D[/color]

      "Dude", "really", the question wasn't if you had already read it. It was
      if you were spouting nonsense or not when you claimed he didn't give you
      a reference. Stop taking those pills from the spam ad and go back to the
      ones the doctor gave you.

      Groetjes,
      Maarten Wiltink


      Comment

      • Skybuck Flying

        #18
        Re: c/pascal compiler differences


        "Maarten Wiltink" <maarten@kitten sandcats.net> wrote in message
        news:412c3887$0 $36860$e4fe514c @news.xs4all.nl ...[color=blue]
        > "Skybuck Flying" <nospam@hotmail .com> wrote in message
        > news:cggg7h$970 $1@news3.tilbu1 .nb.home.nl...[color=green]
        > > "Maarten Wiltink" <maarten@kitten sandcats.net> wrote in message
        > > news:412b25ec$0 $43451$e4fe514c @news.xs4all.nl ...[color=darkred]
        > >> "Skybuck Flying" <nospam@hotmail .com> wrote in message
        > >> news:cgf5n2$fk3 $1@news5.tilbu1 .nb.home.nl...
        > >>> "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
        > >>> news:kerWc.8453 $DG.428478@news 20.bellglobal.c om...[/color][/color]
        >[color=green][color=darkred]
        > >>>> It helps to read the documentation. I gave you a specific reference,
        > >>
        > >>> Huh ? What reference ? :) No you didn't :)
        > >>
        > >> "See the External Declarations entry in the Delphi help. Pay particular
        > >> attention to the $LINK compiler directive."
        > >>
        > >> My baby nieces have a longer attention span, and they listen better,[/color][/color][/color]
        too.[color=blue][color=green]
        > >
        > > Dude, really, I already know that part of the help file, you're boring
        > > me :D
        > >
        > > $LINK directive is boring :D[/color]
        >
        > "Dude", "really", the question wasn't if you had already read it. It was
        > if you were spouting nonsense or not when you claimed he didn't give you
        > a reference. Stop taking those pills from the spam ad and go back to the
        > ones the doctor gave you.[/color]

        The whole point ofcourse is that in C one doesn't need any link directives ?

        Or maybe unless one counts the link directives in visual c's project file :D


        Comment

        • Nicolai Hansen

          #19
          Re: c/pascal compiler differences

          > As usual you think wrong. See the External Declarations entry in the Delphi[color=blue]
          > help. Pay particular attention to the $LINK compiler directive.[/color]

          AFAIK (and as far as I could read from the help files :p) $LINK
          doesn't do anything but link to a non-project file (and as the help
          file says, to use with files of other languages, ie .o/.obj C files/VB
          files).

          The C compiler allows you to generate a kind of "open ended" file (the
          object file) which is compiled but not linked. For example a file
          called test.c

          void MyMethod();

          int main()
          {
          MyMethod();

          return 0;
          }

          This will compile, this will generate an object file, but this will
          not generate an executable. It will say something like "LINKER ERROR:
          unsatisfied external "void MyMethod()" in file test.c".
          At a later time you can then make a file test2.c

          void MyMethod()
          {
          return;
          }

          compile this file, and link test.o with test2.o and generate test.exe.
          Useful? ;-)

          /Nic

          Comment

          • Skybuck Flying

            #20
            Re: c/pascal compiler differences


            "Nicolai Hansen" <nic@aub.dk> wrote in message
            news:d96764ff.0 408250601.30b43 8b@posting.goog le.com...[color=blue][color=green]
            > > As usual you think wrong. See the External Declarations entry in the[/color][/color]
            Delphi[color=blue][color=green]
            > > help. Pay particular attention to the $LINK compiler directive.[/color]
            >
            > AFAIK (and as far as I could read from the help files :p) $LINK
            > doesn't do anything but link to a non-project file (and as the help
            > file says, to use with files of other languages, ie .o/.obj C files/VB
            > files).
            >
            > The C compiler allows you to generate a kind of "open ended" file (the
            > object file) which is compiled but not linked. For example a file
            > called test.c
            >
            > void MyMethod();
            >
            > int main()
            > {
            > MyMethod();
            >
            > return 0;
            > }
            >
            > This will compile, this will generate an object file, but this will
            > not generate an executable. It will say something like "LINKER ERROR:
            > unsatisfied external "void MyMethod()" in file test.c".
            > At a later time you can then make a file test2.c
            >
            > void MyMethod()
            > {
            > return;
            > }
            >
            > compile this file, and link test.o with test2.o and generate test.exe.
            > Useful? ;-)[/color]

            If it's usefull I don't know =D

            But it is interesting :D
            [color=blue]
            >
            > /Nic[/color]


            Comment

            • Bruce Roberts

              #21
              Re: c/pascal compiler differences


              "Nicolai Hansen" <nic@aub.dk> wrote in message
              news:d96764ff.0 408250601.30b43 8b@posting.goog le.com...
              [color=blue]
              > This will compile, this will generate an object file, but this will
              > not generate an executable. It will say something like "LINKER ERROR:
              > unsatisfied external "void MyMethod()" in file test.c".
              > At a later time you can then make a file test2.c[/color]

              If you take a look at a project directory that contains a built project you
              will note that each unit has a .dcu file. This is the "object" file for the
              unit. Using the command line compiler one can compile a discreet Delphi
              unit.


              Comment

              • Bruce Roberts

                #22
                Re: c/pascal compiler differences


                "Skybuck Flying" <nospam@hotmail .com> wrote in message
                news:cghr5n$t1r $1@news3.tilbu1 .nb.home.nl...
                [color=blue]
                > The whole point ofcourse is that in C one doesn't need any link directives[/color]
                ?

                And what, pray tell, is the reason for a MAKE file? At some point the linker
                has to be told what units to link together. It doesn't matter if one is
                writing C or Delphi. Or have you found a compiler that somehow divines a
                programmer's intentions regarding separately compiled units?


                Comment

                • Skybuck Flying

                  #23
                  Re: c/pascal compiler differences


                  "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
                  news:c15Xc.70$i s1.2244@news20. bellglobal.com. ..[color=blue]
                  >
                  > "Skybuck Flying" <nospam@hotmail .com> wrote in message
                  > news:cghr5n$t1r $1@news3.tilbu1 .nb.home.nl...
                  >[color=green]
                  > > The whole point ofcourse is that in C one doesn't need any link[/color][/color]
                  directives[color=blue]
                  > ?
                  >
                  > And what, pray tell, is the reason for a MAKE file? At some point the[/color]
                  linker[color=blue]
                  > has to be told what units to link together. It doesn't matter if one is
                  > writing C or Delphi. Or have you found a compiler that somehow divines a
                  > programmer's intentions regarding separately compiled units?
                  >[/color]

                  Ok I was just screwing around with D8 libraries naturally D8 is a piece a
                  shit and nothing is working...

                  But now that I tried using a library in delphi I can see how it might work
                  in D7 :)

                  procedure blabla; external 'somefricking.d ll';


                  begin

                  blabla;

                  end;

                  This might actually compile and build in delphi

                  actually I am pretty sure lol..

                  But this simple because this is just a dll...

                  But euhmm with the link directive it might work as well...

                  But wtf are .obj files ? :)

                  Does that include C generated files ?

                  Or delphi generated DCU's ?

                  Can I link a DCU file as well ? just like that... with the external stuff ?

                  Seeya.



                  Comment

                  • Skybuck Flying

                    #24
                    Re: c/pascal compiler differences


                    "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
                    news:rZ4Xc.69$i s1.2470@news20. bellglobal.com. ..[color=blue]
                    >
                    > "Nicolai Hansen" <nic@aub.dk> wrote in message
                    > news:d96764ff.0 408250601.30b43 8b@posting.goog le.com...
                    >[color=green]
                    > > This will compile, this will generate an object file, but this will
                    > > not generate an executable. It will say something like "LINKER ERROR:
                    > > unsatisfied external "void MyMethod()" in file test.c".
                    > > At a later time you can then make a file test2.c[/color]
                    >
                    > If you take a look at a project directory that contains a built project[/color]
                    you[color=blue]
                    > will note that each unit has a .dcu file. This is the "object" file for[/color]
                    the[color=blue]
                    > unit. Using the command line compiler one can compile a discreet Delphi
                    > unit.
                    >[/color]

                    Can delphi do this ?

                    Some fricking unit 1

                    function bleh : string;
                    begin
                    result := 'bleh';
                    end;


                    some fricking main pascal/delphi program

                    {$LINK 'some fricking unit1.dcu'}

                    function bleh; external; // ?

                    begin

                    writeln( bleh )
                    readln;
                    end;

                    ???? :)

                    Bye,
                    Skybuck.


                    Comment

                    • Skybuck Flying

                      #25
                      Re: c/pascal compiler differences

                      "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
                      news:rZ4Xc.69$i s1.2470@news20. bellglobal.com. ..[color=blue]
                      >
                      > "Nicolai Hansen" <nic@aub.dk> wrote in message
                      > news:d96764ff.0 408250601.30b43 8b@posting.goog le.com...
                      >[color=green]
                      > > This will compile, this will generate an object file, but this will
                      > > not generate an executable. It will say something like "LINKER ERROR:
                      > > unsatisfied external "void MyMethod()" in file test.c".
                      > > At a later time you can then make a file test2.c[/color]
                      >
                      > If you take a look at a project directory that contains a built project[/color]
                      you[color=blue]
                      > will note that each unit has a .dcu file. This is the "object" file for[/color]
                      the[color=blue]
                      > unit. Using the command line compiler one can compile a discreet Delphi
                      > unit.
                      >[/color]

                      Wait don't tell me one has to use USES for that ?

                      DOH

                      Fuck the link directive..

                      Why can't I simply use this:

                      Uses
                      SomeFrickingObj ect.OBJ :) hehehehe


                      Comment

                      • Skybuck Flying

                        #26
                        Re: c/pascal compiler differences


                        "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
                        news:rZ4Xc.69$i s1.2470@news20. bellglobal.com. ..[color=blue]
                        >
                        > "Nicolai Hansen" <nic@aub.dk> wrote in message
                        > news:d96764ff.0 408250601.30b43 8b@posting.goog le.com...
                        >[color=green]
                        > > This will compile, this will generate an object file, but this will
                        > > not generate an executable. It will say something like "LINKER ERROR:
                        > > unsatisfied external "void MyMethod()" in file test.c".
                        > > At a later time you can then make a file test2.c[/color]
                        >
                        > If you take a look at a project directory that contains a built project[/color]
                        you[color=blue]
                        > will note that each unit has a .dcu file. This is the "object" file for[/color]
                        the[color=blue]
                        > unit. Using the command line compiler one can compile a discreet Delphi
                        > unit.
                        >[/color]

                        Really man the link directive is crazy...

                        All these years I have been programming high up in clouds lol.. hehehehehe

                        YESSSsssss

                        Never having to worry or know what it is that delphi does when I press the
                        build button...

                        And now suddenly I am confronted with a link directive !

                        FUCK :)

                        Shame on you borland for not abstracting that :D LOLOLOLOLOLOLO


                        Comment

                        • CBFalconer

                          #27
                          Re: c/pascal compiler differences

                          Bruce Roberts wrote:[color=blue]
                          > "Nicolai Hansen" <nic@aub.dk> wrote in message
                          >[color=green]
                          >> This will compile, this will generate an object file, but this
                          >> will not generate an executable. It will say something like
                          >> "LINKER ERROR: unsatisfied external "void MyMethod()" in file
                          >> test.c". At a later time you can then make a file test2.c[/color]
                          >
                          > If you take a look at a project directory that contains a built
                          > project you will note that each unit has a .dcu file. This is
                          > the "object" file for the unit. Using the command line compiler
                          > one can compile a discreet Delphi unit.[/color]

                          And what has this got to do with comp.lang.c? Please restrict the
                          cross-posting of things that are off-topic on some groups. All
                          you have to do is religiously set follow-ups, as I have done.

                          --
                          Chuck F (cbfalconer@yah oo.com) (cbfalconer@wor ldnet.att.net)
                          Available for consulting/temporary embedded and systems.
                          <http://cbfalconer.home .att.net> USE worldnet address!


                          Comment

                          • RCollins

                            #28
                            Re: c/pascal compiler differences



                            Skybuck Flying wrote:[color=blue]
                            > "Bruce Roberts" <ber@bounceitat tcanada.xnet> wrote in message
                            > news:c15Xc.70$i s1.2244@news20. bellglobal.com. ..
                            >[color=green]
                            >>"Skybuck Flying" <nospam@hotmail .com> wrote in message
                            >>news:cghr5n$t 1r$1@news3.tilb u1.nb.home.nl.. .
                            >>
                            >>[color=darkred]
                            >>>The whole point ofcourse is that in C one doesn't need any link[/color][/color]
                            >
                            > directives
                            >[color=green]
                            >>?
                            >>
                            >>And what, pray tell, is the reason for a MAKE file? At some point the[/color]
                            >
                            > linker
                            >[color=green]
                            >>has to be told what units to link together. It doesn't matter if one is
                            >>writing C or Delphi. Or have you found a compiler that somehow divines a
                            >>programmer' s intentions regarding separately compiled units?
                            >>[/color]
                            >
                            >
                            > Ok I was just screwing around with D8 libraries naturally D8 is a piece a
                            > shit and nothing is working...
                            >
                            > But now that I tried using a library in delphi I can see how it might work
                            > in D7 :)
                            >
                            > procedure blabla; external 'somefricking.d ll';
                            >
                            >
                            > begin
                            >
                            > blabla;
                            >
                            > end;
                            >
                            > This might actually compile and build in delphi
                            >
                            > actually I am pretty sure lol..
                            >
                            > But this simple because this is just a dll...
                            >
                            > But euhmm with the link directive it might work as well...
                            >
                            > But wtf are .obj files ? :)
                            >
                            > Does that include C generated files ?
                            >
                            > Or delphi generated DCU's ?
                            >
                            > Can I link a DCU file as well ? just like that... with the external stuff ?
                            >
                            > Seeya.
                            >
                            >
                            >[/color]

                            None of this stuff has anything to do with the C language. It is all
                            specific to the brand of compiler you are using (Microsoft or Borland).
                            "obj" files are compiled (but not linked) created by Microsoft
                            compilers; "dcu" files are compiled (but not linked) created by Borland
                            Delphi compilers.

                            You would get more usefull info by checking in a Microsoft and/or
                            Borland newsgroup.

                            --
                            Ron Collins
                            Air Defense/RTSC/BCS

                            Comment

                            • Giorgos Keramidas

                              #29
                              Re: c/pascal compiler differences

                              "Skybuck Flying" <nospam@hotmail .com> writes:[color=blue]
                              > Why can't I simply use this:
                              >
                              > Uses
                              > SomeFrickingObj ect.OBJ :) hehehehe[/color]

                              Ask in a Delphi newsgroup but please keep comp.lang.c out of this.
                              The intricacies of Delphi are totally unrelated to C.

                              [-- Followups properly redirected --]

                              Comment

                              Working...