c/pascal compiler differences

B

Bruce Roberts

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

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.
 
B

Bruce Roberts

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

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?
 
S

Skybuck Flying

Bruce Roberts said:
directives
?

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?

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.
 
S

Skybuck Flying

Bruce Roberts said:
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.

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.
 
C

CBFalconer

Bruce said:
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.

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.
 
S

Skybuck Flying

Bruce Roberts said:
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.

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

DOH

**** the link directive..

Why can't I simply use this:

Uses
SomeFrickingObject.OBJ :) hehehehe
 
S

Skybuck Flying

Bruce Roberts said:
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.

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 !

**** :)

Shame on you borland for not abstracting that :D LOLOLOLOLOLOLO
 
R

RCollins

Skybuck said:
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.

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.
 
G

Giorgos Keramidas

Skybuck Flying said:
Why can't I simply use this:

Uses
SomeFrickingObject.OBJ :) hehehehe

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 --]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top