Connecting Tech Pros Worldwide Forums | Help | Site Map

c/pascal compiler differences

Skybuck Flying
Guest
 
Posts: n/a
#1: Nov 14 '05
Hi,

I think I understand now a bit better what the difference is between a c
compiler and a pascal compiler.

For example:

When compiling source code with a pascal compiler. The pascal compiler will
simply stop when it is missing an implementation for a procedure or
whatever.

The c compiler however will simply continue compiling even if the
implementation for the headers/prototypes are missing.

The c linker will then report a big list of link errors.

Both methods have benefits and drawbacks. The pascal compiler is more
simple... it allows one to simply proceed from error to error until it
completely compiles and links.

The drawback of the c compiler might be the suspended error reporting...
it's a bit wacky... since one can not jump to the location where the stuff
is missing ?

or maybe one can... it's a bit wacky...

Though I can clearly see a benefit for a c compiler since it simply compiles
even though the implementation is completely missing.

One could later even make different implementations and simple re-use the
already compiled stuff and link against it.

So one can end up linking different kind of stuff against the same compiled
C file.

I think this is correct though I never really tried it.

Are there any good examples where this C/link freedom is used ?

Does a pascal compiler have the same link freedom ? ( meaning prototype
available but implementation missing )

I think not... ?

Bye,
Skybuck.



Maarten Wiltink
Guest
 
Posts: n/a
#2: Nov 14 '05

re: c/pascal compiler differences


"Skybuck Flying" <nospam@hotmail.com> wrote in message
news:cga2mq$tt0$1@news2.tilbu1.nb.home.nl...
[color=blue]
> I think I understand now a bit better what the difference is between a
> c compiler and a pascal compiler.
>
> For example:
>
> When compiling source code with a pascal compiler. The pascal compiler
> will simply stop when it is missing an implementation for a procedure
> or whatever.
>
> The c compiler however will simply continue compiling even if the
> implementation for the headers/prototypes are missing.[/color]

Pascal was specifically designed to allow one-pass compilation. So
whenever something is missing, that's an instant error. C, also by
design, is much looser. You can put a "void writeln();" pretty much
anywhere in your code, and there is no error until you try to link
together an executable that doesn't have a writeln procedure somewhere.
There's a keyword "extern", but it may be omitted.

Groetjes,
Maarten Wiltink


CBFalconer
Guest
 
Posts: n/a
#3: Nov 14 '05

re: c/pascal compiler differences


Skybuck Flying wrote:[color=blue]
>
> I think I understand now a bit better what the difference is
> between a c compiler and a pascal compiler.[/color]

.... snip gross misconceptions ...

The fundamental difference is the source language. Anything else
is a frill. c.l.c deals solely with the language, and not the
compilers. The languages are defined by the ISO standards.

BTW, Pascal is always capitalized.

--
fix (vb.): 1. to paper over, obscure, hide from public view; 2.
to work around, in a way that produces unintended consequences
that are worse than the original problem. Usage: "Windows ME
fixes many of the shortcomings of Windows 98 SE". - Hutchison


Nicolai Hansen
Guest
 
Posts: n/a
#4: Nov 14 '05

re: c/pascal compiler differences


> When compiling source code with a pascal compiler. The pascal compiler will[color=blue]
> simply stop when it is missing an implementation for a procedure or
> whatever.
>
> The c compiler however will simply continue compiling even if the
> implementation for the headers/prototypes are missing.
>
> The c linker will then report a big list of link errors.[/color]

C got two stages of compiling, compilation and linking. Pascal doesn't
use linking (here it is a part of the normal compilation). In C it is
not a compilation error if an implementation of a method/variable is
missing; it is a linker error. In Pascal it is a compiler error as it
links while compiling.

Of course you can make a program with a button which, on clicking,
will run "MyMethod()" which is defined in "blah.h" but missing the
implementation. You can then compile ten different object files with
ten different implementations of MyMethod(), then link them into ten
different programs with ten different things happening when you click
the button.

But you can do that same thing in Pascal, make your onclick run
MyProcedure(), make ten different MyProcedure() implementations, then
add one of them to your uses. Generates the same as the C linker. It
will compile the whole thing everytime (unlike C where only the linker
is run), but in Pascal you can actually have all ten implementations
of MyProcedure() in the same project ;)
Bruce Roberts
Guest
 
Posts: n/a
#5: Nov 14 '05

re: c/pascal compiler differences



"Skybuck Flying" <nospam@hotmail.com> wrote in message
news:cga2mq$tt0$1@news2.tilbu1.nb.home.nl...
[color=blue]
> Does a pascal compiler have the same link freedom ? ( meaning prototype
> available but implementation missing )
>
> I think not... ?[/color]

As usual you think wrong. See the External Declarations entry in the Delphi
help. Pay particular attention to the $LINK compiler directive.


Skybuck Flying
Guest
 
Posts: n/a
#6: Nov 14 '05

re: c/pascal compiler differences



"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:xxmWc.7965$DG.360341@news20.bellglobal.com...[color=blue]
>
> "Skybuck Flying" <nospam@hotmail.com> wrote in message
> news:cga2mq$tt0$1@news2.tilbu1.nb.home.nl...
>[color=green]
> > Does a pascal compiler have the same link freedom ? ( meaning prototype
> > available but implementation missing )
> >
> > I think not... ?[/color]
>
> As usual you think wrong. See the External Declarations entry in the[/color]
Delphi[color=blue]
> help. Pay particular attention to the $LINK compiler directive.[/color]

When is it linked into it ?

Occurding to some posts... compiling and linking is the same thing in
pascal.

So it's actually linked in at compile time... that would be my guess.

That's still fundamentally different than C ;)

Unless I am mistaking :D


Xenos
Guest
 
Posts: n/a
#7: Nov 14 '05

re: c/pascal compiler differences



"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:xxmWc.7965$DG.360341@news20.bellglobal.com...[color=blue]
>
> "Skybuck Flying" <nospam@hotmail.com> wrote in message
> news:cga2mq$tt0$1@news2.tilbu1.nb.home.nl...
>[color=green]
> > Does a pascal compiler have the same link freedom ? ( meaning prototype
> > available but implementation missing )
> >
> > I think not... ?[/color]
>
> As usual you think wrong. See the External Declarations entry in the[/color]
Delphi[color=blue]
> help. Pay particular attention to the $LINK compiler directive.
>
>[/color]
That Delphi, not standard Pascal.


Bruce Roberts
Guest
 
Posts: n/a
#8: Nov 14 '05

re: c/pascal compiler differences



"Skybuck Flying" <nospam@hotmail.com> wrote in message
news:cgd0h6$aha$1@news3.tilbu1.nb.home.nl...
[color=blue]
> Occurding to some posts... compiling and linking is the same thing in
> pascal.
>
> So it's actually linked in at compile time... that would be my guess.
>
> That's still fundamentally different than C ;)[/color]

Delphi first compiles units then it links the project. If all units are
up-to-date, essentially the only thing that happens is the linking.



Maarten Wiltink
Guest
 
Posts: n/a
#9: Nov 14 '05

re: c/pascal compiler differences


"Skybuck Flying" <nospam@hotmail.com> wrote in message
news:cgd0h6$aha$1@news3.tilbu1.nb.home.nl...
[...][color=blue]
> Occurding to some posts... compiling and linking is the same thing in
> pascal.[/color]

D-C-U.

Groetjes,
Maarten Wiltink


Flash Gordon
Guest
 
Posts: n/a
#10: Nov 14 '05

re: c/pascal compiler differences


On Mon, 23 Aug 2004 17:02:47 +0200
"Skybuck Flying" <nospam@hotmail.com> wrote:
[color=blue]
>
> "Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
> news:xxmWc.7965$DG.360341@news20.bellglobal.com...[color=green]
> >
> > "Skybuck Flying" <nospam@hotmail.com> wrote in message
> > news:cga2mq$tt0$1@news2.tilbu1.nb.home.nl...
> >[color=darkred]
> > > Does a pascal compiler have the same link freedom ? ( meaning
> > > prototype available but implementation missing )
> > >
> > > I think not... ?[/color]
> >
> > As usual you think wrong. See the External Declarations entry in the[/color]
> Delphi[color=green]
> > help. Pay particular attention to the $LINK compiler directive.[/color]
>
> When is it linked into it ?
>
> Occurding to some posts... compiling and linking is the same thing in
> pascal.
>
> So it's actually linked in at compile time... that would be my guess.
>
> That's still fundamentally different than C ;)
>
> Unless I am mistaking :D[/color]

It all depends on WHICH Pascal variant you are talking about. I've used
versions of Pascal where the Linking was done at run time.

The original Pascal definition did not support separately compiled
modules so there was not much linking to be done. Later extensions added
separate compilation of modules at which point linkers became involved
and worked basically the same as they do for C. However, the language
definition still included (and probably still does) a requirement to
declare before first use, something the original C did not (I can't
remember if C99 has added that but some compilers provide it as an
extension). To allow for things like mutually recursive functions Pascal
included a forward declaration which gives the compiler the signature of
the function and tells it to resolve it further down the file.

Also, whilst Pascal and C are very different languages in many respects
there are implementations which provide mechanisms for linking C code
and Pascal code, so the linkage requirements of the languages can't be
mutually incompatible. However, the method for linking the two languages
is off topic for this group. :-)
--
Flash Gordon
Sometimes I think shooting would be far too good for some people.
Although my email address says spam, it is real and I read it.
Skybuck Flying
Guest
 
Posts: n/a
#11: Nov 14 '05

re: c/pascal compiler differences



"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:8ApWc.8357$DG.405281@news20.bellglobal.com...[color=blue]
>
> "Skybuck Flying" <nospam@hotmail.com> wrote in message
> news:cgd0h6$aha$1@news3.tilbu1.nb.home.nl...
>[color=green]
> > Occurding to some posts... compiling and linking is the same thing in
> > pascal.
> >
> > So it's actually linked in at compile time... that would be my guess.
> >
> > That's still fundamentally different than C ;)[/color]
>
> Delphi first compiles units then it links the project. If all units are
> up-to-date, essentially the only thing that happens is the linking.
>[/color]

Ok, let's take it to the test:

procedure unimplemented;

begin

unimplemeted;

end.

void unimplemented();

int main()
{

unimplemented();

}

Without actually having given ;) it a try I think the delphi/pascal example
won't even compile :) and the C version will just like that :D

Is there a way to make the pascal example compile and then later link
different files to it ? ( I think not ? )

The difference is: I could distribute my compiled C program to anybody...
and tell them to simply implement a few function and link it and suprise
suprise it would actually work :D

Lol, I think pascal/delphi will be another story !

Bye,
Skybuck.


Bruce Roberts
Guest
 
Posts: n/a
#12: Nov 14 '05

re: c/pascal compiler differences



"Skybuck Flying" <nospam@hotmail.com> wrote in message
news:cgddeu$rqe$1@news5.tilbu1.nb.home.nl...
[color=blue]
> Ok, let's take it to the test:[/color]
[color=blue]
> Without actually having given ;) it a try I think the delphi/pascal[/color]
example[color=blue]
> won't even compile :) and the C version will just like that :D[/color]

It helps to read the documentation. I gave you a specific reference, if you
had read it you would see that, with the correct syntax, your Delphi would
have compiled just fine.


Flash Gordon
Guest
 
Posts: n/a
#13: Nov 14 '05

re: c/pascal compiler differences


On Mon, 23 Aug 2004 13:00:10 -0400
"Xenos" <dont.spam.me@spamhate.com> wrote:
[color=blue]
>
> "Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
> news:xxmWc.7965$DG.360341@news20.bellglobal.com...[color=green]
> >
> > "Skybuck Flying" <nospam@hotmail.com> wrote in message
> > news:cga2mq$tt0$1@news2.tilbu1.nb.home.nl...
> >[color=darkred]
> > > Does a pascal compiler have the same link freedom ? ( meaning
> > > prototype available but implementation missing )
> > >
> > > I think not... ?[/color]
> >
> > As usual you think wrong. See the External Declarations entry in the[/color]
> Delphi[color=green]
> > help. Pay particular attention to the $LINK compiler directive.
> >[/color]
> That Delphi, not standard Pascal.[/color]

Similar things apply to every Pascal implementation I have used, and
that is quite a few. I believe that ISO standard Pascal also supports
separate compilation of modules.
--
Flash Gordon
Sometimes I think shooting would be far too good for some people.
Although my email address says spam, it is real and I read it.
Skybuck Flying
Guest
 
Posts: n/a
#14: Nov 14 '05

re: c/pascal compiler differences



"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:kerWc.8453$DG.428478@news20.bellglobal.com...[color=blue]
>
> "Skybuck Flying" <nospam@hotmail.com> wrote in message
> news:cgddeu$rqe$1@news5.tilbu1.nb.home.nl...
>[color=green]
> > Ok, let's take it to the test:[/color]
>[color=green]
> > Without actually having given ;) it a try I think the delphi/pascal[/color]
> example[color=green]
> > won't even compile :) and the C version will just like that :D[/color]
>
> It helps to read the documentation. I gave you a specific reference, if[/color]
you

Huh ? What reference ? :) No you didn't :)
[color=blue]
> had read it you would see that, with the correct syntax, your Delphi would
> have compiled just fine.
>
>[/color]


Maarten Wiltink
Guest
 
Posts: n/a
#15: Nov 14 '05

re: c/pascal compiler differences


"Skybuck Flying" <nospam@hotmail.com> wrote in message
news:cgf5n2$fk3$1@news5.tilbu1.nb.home.nl...[color=blue]
> "Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
> news:kerWc.8453$DG.428478@news20.bellglobal.com...[/color]
[color=blue][color=green]
>> It helps to read the documentation. I gave you a specific reference,[/color][/color]
[color=blue]
> 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.

Groetjes,
Maarten Wiltink


Skybuck Flying
Guest
 
Posts: n/a
#16: Nov 14 '05

re: c/pascal compiler differences



"Maarten Wiltink" <maarten@kittensandcats.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@bounceitattcanada.xnet> wrote in message
> > news:kerWc.8453$DG.428478@news20.bellglobal.com...[/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


Maarten Wiltink
Guest
 
Posts: n/a
#17: Nov 14 '05

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@kittensandcats.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@bounceitattcanada.xnet> wrote in message
>>> news:kerWc.8453$DG.428478@news20.bellglobal.com...[/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


Skybuck Flying
Guest
 
Posts: n/a
#18: Nov 14 '05

re: c/pascal compiler differences



"Maarten Wiltink" <maarten@kittensandcats.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@kittensandcats.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@bounceitattcanada.xnet> wrote in message
> >>> news:kerWc.8453$DG.428478@news20.bellglobal.com...[/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


Nicolai Hansen
Guest
 
Posts: n/a
#19: Nov 14 '05

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
Skybuck Flying
Guest
 
Posts: n/a
#20: Nov 14 '05

re: c/pascal compiler differences



"Nicolai Hansen" <nic@aub.dk> wrote in message
news:d96764ff.0408250601.30b438b@posting.google.co m...[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]


Bruce Roberts
Guest
 
Posts: n/a
#21: Nov 14 '05

re: c/pascal compiler differences



"Nicolai Hansen" <nic@aub.dk> wrote in message
news:d96764ff.0408250601.30b438b@posting.google.co m...
[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.


Bruce Roberts
Guest
 
Posts: n/a
#22: Nov 14 '05

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?


Skybuck Flying
Guest
 
Posts: n/a
#23: Nov 14 '05

re: c/pascal compiler differences



"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:c15Xc.70$is1.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.dll';


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.



Skybuck Flying
Guest
 
Posts: n/a
#24: Nov 14 '05

re: c/pascal compiler differences



"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:rZ4Xc.69$is1.2470@news20.bellglobal.com...[color=blue]
>
> "Nicolai Hansen" <nic@aub.dk> wrote in message
> news:d96764ff.0408250601.30b438b@posting.google.co m...
>[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.


Skybuck Flying
Guest
 
Posts: n/a
#25: Nov 14 '05

re: c/pascal compiler differences


"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:rZ4Xc.69$is1.2470@news20.bellglobal.com...[color=blue]
>
> "Nicolai Hansen" <nic@aub.dk> wrote in message
> news:d96764ff.0408250601.30b438b@posting.google.co m...
>[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
SomeFrickingObject.OBJ :) hehehehe


Skybuck Flying
Guest
 
Posts: n/a
#26: Nov 14 '05

re: c/pascal compiler differences



"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:rZ4Xc.69$is1.2470@news20.bellglobal.com...[color=blue]
>
> "Nicolai Hansen" <nic@aub.dk> wrote in message
> news:d96764ff.0408250601.30b438b@posting.google.co m...
>[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


CBFalconer
Guest
 
Posts: n/a
#27: Nov 14 '05

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@yahoo.com) (cbfalconer@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


RCollins
Guest
 
Posts: n/a
#28: Nov 14 '05

re: c/pascal compiler differences




Skybuck Flying wrote:[color=blue]
> "Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
> news:c15Xc.70$is1.2244@news20.bellglobal.com...
>[color=green]
>>"Skybuck Flying" <nospam@hotmail.com> wrote in message
>>news:cghr5n$t1r$1@news3.tilbu1.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.dll';
>
>
> 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

Giorgos Keramidas
Guest
 
Posts: n/a
#29: Nov 14 '05

re: c/pascal compiler differences


"Skybuck Flying" <nospam@hotmail.com> writes:[color=blue]
> Why can't I simply use this:
>
> Uses
> SomeFrickingObject.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 --]
Closed Thread


Similar C / C++ bytes