Home > Archive > Clipper > April 2006 > Problems compiling and linking
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Problems compiling and linking
|
|
| Christine 2006-04-06, 6:55 pm |
| I am new to clipper and am trying to get one of my inherited
applications to compile and create an exe.
I do not get any errors when I compile the source code, but when I use
rtlink, I am getting a warning saying that says that net_use is an
undefined symbol.
THe .prg containing that function is in the same directory as the rest
of the source code. Where is my problem?
Just point me in the right directions and I should be good to go.
THanks in Advance
| |
|
|
Christine wrote:
> I am new to clipper and am trying to get one of my inherited
> applications to compile and create an exe.
>
> I do not get any errors when I compile the source code, but when I use
> rtlink, I am getting a warning saying that says that net_use is an
> undefined symbol.
>
> THe .prg containing that function is in the same directory as the rest
> of the source code. Where is my problem?
>
> Just point me in the right directions and I should be good to go.
>
> THanks in Advance
Did you compile the .prg with net_use and include the .obj file in your
linking?
What linker are you using?
Posting your link script and giving the name of the net_use .prg would
be a good idea.
You won't get errors like this during compile. Clipper assumes you'll
explain any functions it doesn't know when you link.
| |
| Christine 2006-04-06, 6:55 pm |
| I compiled as follows:
clipper ap
ap being my top level .prg so everything should go into one .obj
I link as follows:
ftlink /verbose fi ap
Any other information you need? THanks
| |
| Robert J. Stuart 2006-04-06, 6:55 pm |
| Christine, It looks to me like you have a function call or a procedure call
named net_use that you are calling from your application that does not
exist. Do a text search of your source code for the word net_use and see
what it refers to. Then look to see that you do or don't have a function or
another procedure that is named net_use. My guess is that net_use is a call
that is being made, that is not getting linked with the rest of your obj
code.
Just as an example, I might call a function net_use() and as part of that
function call the dos command net with the argument use and then map a drive
or a printer:
swpruncmd("net use lpt1 \\main\lpt1")
this would map the lpt1 printer port to the main server's lpt1, just as an
example.
Just giving you a place to start looking.
Bob S.
"Christine" <ctaber@harriscomputer.com> wrote in message
news:1144336945.621282.229430@z34g2000cwc.googlegroups.com...
> I am new to clipper and am trying to get one of my inherited
> applications to compile and create an exe.
>
> I do not get any errors when I compile the source code, but when I use
> rtlink, I am getting a warning saying that says that net_use is an
> undefined symbol.
>
> THe .prg containing that function is in the same directory as the rest
> of the source code. Where is my problem?
>
> Just point me in the right directions and I should be good to go.
>
> THanks in Advance
>
| |
| E. Fridman 2006-04-06, 6:55 pm |
| Christine,
<<< The .prg containing that function is in the same directory as the
rest of the source code. >>>
<<< I compiled as follows:
clipper ap
ap being my top level .prg so everything should go into one .obj >>>
What makes you think so?
Unless your code uses old-style "DO ... WITH" commands, Clipper will
not pull in anything outside from the PRG it's compiling and will
instead delegate this task to linker. Linker in turn needs to know the
exact list of OBJs to combine into your executable. So you need either
list them all in the command line or use link scripts (LNK files).
You may want also to look into RMAKE utility.
HTH, Eugene
| |
| Robert J. Stuart 2006-04-06, 6:55 pm |
| I used to compile like that too but now I set up .clp files and list all of
the .prg code files and run clipper:
clipper @file1.clp
clipper @file2.clp
this then creates my .obj files for linking. Then using a .lnk file, I list
all of my .obj files
My way is somewhat more protracted and the way the Eugene suggests is the
cleaner way.
"E. Fridman" <pm771.am@gmail.com> wrote in message
news:1144345866.617309.29530@t31g2000cwb.googlegroups.com...
> Christine,
>
> <<< The .prg containing that function is in the same directory as the
> rest of the source code. >>>
>
> <<< I compiled as follows:
> clipper ap
> ap being my top level .prg so everything should go into one .obj >>>
>
> What makes you think so?
>
> Unless your code uses old-style "DO ... WITH" commands, Clipper will
> not pull in anything outside from the PRG it's compiling and will
> instead delegate this task to linker. Linker in turn needs to know the
> exact list of OBJs to combine into your executable. So you need either
> list them all in the command line or use link scripts (LNK files).
>
> You may want also to look into RMAKE utility.
>
> HTH, Eugene
>
| |
| pete@nospam.demon.co.uk 2006-04-06, 6:55 pm |
| In article <1144336945.621282.229430@z34g2000cwc.googlegroups.com>
ctaber@harriscomputer.com "Christine" writes:
Hi Christine,
> I am new to clipper and am trying to get one of my inherited
> applications to compile and create an exe.
>
> I do not get any errors when I compile the source code, but when I use
> rtlink, I am getting a warning saying that says that net_use is an
> undefined symbol.
Which version of Clipper are you using for this? Looking at the
Summer '87 version with which I'm familiar I see that there is a
file called LOCKS.PRG in the distribution that contains a
'net_use()' function definition. May be similar in Clipper 5.x?
> THe .prg containing that function is in the same directory as the rest
> of the source code. Where is my problem?
Being in the same directory might not help very much :-( Only if
the referenced procedure/function exists as a PRG with the same
name will what you expect work. That's to say, if there were a
file called NET_USE.PRG Clipper would have a chance of finding
it; if the net_use() function is "hidden" in another file, all
bets are off.
> Just point me in the right directions and I should be good to go.
Looking at your later post, what you most likely need to do is:
clipper -m ap
clipper -m locks
clipper -m (whatever_else}
then
rtlink ap,locks,{whatever_else} lib clipper,extend
or something similar (I'm not familiar with rtlink syntax).
> THanks in Advance
Trying to help rather than confuse...
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
| AUGE_OHR 2006-04-06, 6:55 pm |
| hi,
> I compiled as follows:
> clipper ap
so you get only 1 *.OBJ
try to compile your PRG, which contain NET_USE (LOCK.PRG ?),
as "standalone" (clipper lock -n )
now you shoud have 2 *.OBJ
> I link as follows:
> ftlink /verbose fi ap
now link RTLINK FI AP, LOCK
>I am getting a warning saying that says that net_use is an
>undefined symbol.
btw. using NET_USE meen that you going to "Network" compatible ...
did you also rewrite rest of you source with RLOCK() ?
greetings by OHR
Jimmy
|
|
|
|
|