Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > undefined reference to `link'

Reply
Thread Tools

undefined reference to `link'

 
 
Seebs
Guest
Posts: n/a
 
      11-03-2011
On 2011-11-03, Gordon Burditt <(E-Mail Removed)> wrote:
>> [unattributed quote]


This is really annoying. It is completely pointless. It does not
provide you with any legal protection that I've ever heard of, and it
makes it much harder to follow your "contributions" to conversations.

.... enough harder that I, for one, am just plonking you because it's
not worth the hassle of trying to figure out who you don't think you
were really responding to.

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
 
 
 
Kaz Kylheku
Guest
Posts: n/a
 
      11-03-2011
On 2011-11-03, Seebs <(E-Mail Removed)> wrote:
> On 2011-11-03, Gordon Burditt <(E-Mail Removed)> wrote:
>>> [unattributed quote]

>
> This is really annoying. It is completely pointless. It does not


I don't see the big problem. Gordon left the parent article reference intact,
so it's easy to see where the quote came from.

In slrn: ESC-P fetches the parent article. There it is: "Acid Washed".
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      11-03-2011
Kaz Kylheku <(E-Mail Removed)> writes:
> On 2011-11-03, Seebs <(E-Mail Removed)> wrote:
>> On 2011-11-03, Gordon Burditt <(E-Mail Removed)> wrote:
>>>> [unattributed quote]

>>
>> This is really annoying. It is completely pointless. It does not

>
> I don't see the big problem. Gordon left the parent article reference intact,
> so it's easy to see where the quote came from.
>
> In slrn: ESC-P fetches the parent article. There it is: "Acid Washed".


Then why did you bother to quote the parent article?

In the newsreader I use (Gnus), it's easy to jump to the parent
article, but it can be difficult to get back (or maybe there's a
command I don't know about). The vast majority of posters here quote
enough of the parent article that I rarely need to bother. I find
Gordon's stubborn refusal to attribute quoted text inexplicable
and annoying. (Though I do give him credit for respecting my wishes
by not quoting my text without attribution.)

And there's a solution that would simultaneously make Gordon's
articles as easy to read as anyone else's and satisfy his paranoia.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Seebs
Guest
Posts: n/a
 
      11-03-2011
On 2011-11-03, Kaz Kylheku <(E-Mail Removed)> wrote:
> I don't see the big problem. Gordon left the parent article reference intact,
> so it's easy to see where the quote came from.


If the other article happens to be available.

> In slrn: ESC-P fetches the parent article. There it is: "Acid Washed".


Some people read news offline. I'm one of them. And while in theory I can
go around navigating article trees to look stuff up, in practice, it breaks
the general rule that I don't like to spend more effort than the reward I
get.

I don't desperately need to read his posts. I'm not going to if making sense
of them requires more effort than making sense of normal Usenet posts does.

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / (E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
Geoff
Guest
Posts: n/a
 
      11-03-2011
On Wed, 02 Nov 2011 00:01:58 +0800, Jinsong Zhao <(E-Mail Removed)>
wrote:

>Is it possible to compile the code on Windows? If yes, how to change the
>code?


Yes.

Delete this line (line 5):
# include <unistd.h>
It's for POSIX and it's not needed for Windows and you won't need the
link and unlink POSIXisms below.

Instead of (line 563):

if ( unlink(file_out_name),link(file_temp_name, file_out_name) == -1
||
unlink(file_temp_name) == -1)
{

write:

if ( rename(file_temp_name, file_out_name) == -1 )
{

Instead of (line 606):

if ( unlink ( file_temp_name ) == -1)
{

write:

if ( remove ( file_temp_name ) == -1)
{

 
Reply With Quote
 
jgharston
Guest
Posts: n/a
 
      11-04-2011
Keith Thompson wrote:
> jgharston wrote:
> > If you're using link/unlink to rename a file, the stdio library
> > contains the standard rename() function.

>
> rename() doesn't do what the Unix link() system call does.


That's why I wrote "If you're using link/unlink to rename a file..."

JGH
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      11-04-2011
jgharston <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> jgharston wrote:
>> > If you're using link/unlink to rename a file, the stdio library
>> > contains the standard rename() function.

>>
>> rename() doesn't do what the Unix link() system call does.

>
> That's why I wrote "If you're using link/unlink to rename a file..."


Ok, I didn't pay enough attention to the context.

But why would you use link and unlink to rename a file in the first
place? rename() exists both as a Unix system call and as a standard C
library function.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Jinsong Zhao
Guest
Posts: n/a
 
      11-04-2011
On 2011-11-4 5:52, Geoff wrote:
> On Wed, 02 Nov 2011 00:01:58 +0800, Jinsong Zhao<(E-Mail Removed)>
> wrote:
>
>> Is it possible to compile the code on Windows? If yes, how to change the
>> code?

>
> Yes.
>
> Delete this line (line 5):
> # include<unistd.h>
> It's for POSIX and it's not needed for Windows and you won't need the
> link and unlink POSIXisms below.
>
> Instead of (line 563):
>
> if ( unlink(file_out_name),link(file_temp_name, file_out_name) == -1
> ||
> unlink(file_temp_name) == -1)
> {
>
> write:
>
> if ( rename(file_temp_name, file_out_name) == -1 )
> {
>
> Instead of (line 606):
>
> if ( unlink ( file_temp_name ) == -1)
> {
>
> write:
>
> if ( remove ( file_temp_name ) == -1)
> {
>


Thank you very much. it now could be compiled without any error.

However, it does not work as expected. It gave the following error message:

E:\f77split>a f77split_prb.f
Splitting f77split_prb.f.

F77SPLIT: Error!
Cannot move "fsplit.XXXXX" to "alpha.f".

Regards,
Jinsong
 
Reply With Quote
 
Geoff
Guest
Posts: n/a
 
      11-04-2011
On Fri, 04 Nov 2011 08:19:27 +0800, Jinsong Zhao <(E-Mail Removed)>
wrote:

>On 2011-11-4 5:52, Geoff wrote:
>> On Wed, 02 Nov 2011 00:01:58 +0800, Jinsong Zhao<(E-Mail Removed)>
>> wrote:
>>
>>> Is it possible to compile the code on Windows? If yes, how to change the
>>> code?

>>
>> Yes.
>>
>> Delete this line (line 5):
>> # include<unistd.h>
>> It's for POSIX and it's not needed for Windows and you won't need the
>> link and unlink POSIXisms below.
>>
>> Instead of (line 563):
>>
>> if ( unlink(file_out_name),link(file_temp_name, file_out_name) == -1
>> ||
>> unlink(file_temp_name) == -1)
>> {
>>
>> write:
>>
>> if ( rename(file_temp_name, file_out_name) == -1 )
>> {
>>
>> Instead of (line 606):
>>
>> if ( unlink ( file_temp_name ) == -1)
>> {
>>
>> write:
>>
>> if ( remove ( file_temp_name ) == -1)
>> {
>>

>
>Thank you very much. it now could be compiled without any error.
>
>However, it does not work as expected. It gave the following error message:
>
>E:\f77split>a f77split_prb.f
>Splitting f77split_prb.f.
>
>F77SPLIT: Error!
> Cannot move "fsplit.XXXXX" to "alpha.f".
>
>Regards,
>Jinsong


Amend line 563 to read:
if ( remove(file_out_name), rename(file_temp_name, file_out_name)
== -1 )
 
Reply With Quote
 
Jinsong Zhao
Guest
Posts: n/a
 
      11-04-2011
On 2011-11-4 12:32, Geoff wrote:
> remove(file_out_name), rename(file_temp_name, file_out_name


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
typeof x == 'undefined' or x == undefined? -Lost Javascript 13 01-31-2007 12:04 AM
undefined vs. undefined (was: new Array() vs []) VK Javascript 45 09-12-2006 05:26 PM
'Undefined' Client-Side Object Reference Felipe ASP .Net 3 07-16-2004 04:01 AM
undefined behavior or not undefined behavior? That is the question Mantorok Redgormor C Programming 70 02-17-2004 02:46 PM
Error: 'undefined reference' in g++ but gcc succeeded Lu C++ 1 07-10-2003 12:55 PM



Advertisments