ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] JT Help for compile
@ 2003-06-04 18:15 viro
  2003-06-04 19:24 ` Pavel S. Khmelinsky
  0 siblings, 1 reply; 6+ messages in thread
From: viro @ 2003-06-04 18:15 UTC (permalink / raw)
  To: ALT Linux Mailing List

Очень нужно получать для себя несколько цифр в удобной форме

Есть и установленна библиотека libnova:
$ ls -1 /usr/lib/libnova*
/usr/lib/libnova-0.3.so.1
/usr/lib/libnova-0.3.so.1.0.0
/usr/lib/libnova-0.7.so.0
/usr/lib/libnova-0.7.so.0.0.0
/usr/lib/libnova.a
/usr/lib/libnova.la
/usr/lib/libnova.so

Файл /usr/include/libnova.h содержит:
struct ln_date
{
    int years;          /*!< Years. All values are valid */
    int months;         /*!< Months. Valid values : 1 (January) - 12 (December) */
    int days;           /*!< Days. Valid values 1 - 28,29,30,31 Depends on month.*/
    int hours;          /*!< Hours. Valid values 0 - 23. */
    int minutes;        /*!< Minutes. Valid values 0 - 59. */
    double seconds;     /*!< Seconds. Valid values 0 -	59.99999.... */
};
double get_julian_day (struct ln_date * date);
Программа такова:
$ cat  proba.c
#include "libnova.h"
#include <stdio.h>
#include <stdlib.h>
int main ()
{
    double JD;
    struct ln_date date;
    date.years = 2003;
    date.months = 5;
    date.days = 21;
    date.hours = 0;
    date.minutes = 0;
    date.seconds = 0;
    JD = get_julian_day (&date);
    printf ("JD: %s", JD);
    return (0);
}

Результат компиляции таков:
$ gcc proba.c -o proba
/home/vic/tmp/cc7z8m4y.o: In function `main':
/home/vic/tmp/cc7z8m4y.o(.text+0x3f): undefined reference to `get_julian_day'
collect2: ld returned 1 exit status

Что надо доделать?

Спасибо.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Comm] JT Help for compile
  2003-06-04 18:15 [Comm] JT Help for compile viro
@ 2003-06-04 19:24 ` Pavel S. Khmelinsky
  2003-06-05  5:22   ` viro
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel S. Khmelinsky @ 2003-06-04 19:24 UTC (permalink / raw)
  To: community


viro@mail.ru wrote:
> Очень нужно получать для себя несколько цифр в удобной форме
> 
> Есть и установленна библиотека libnova:
> $ ls -1 /usr/lib/libnova*
> /usr/lib/libnova-0.3.so.1
> /usr/lib/libnova-0.3.so.1.0.0
> /usr/lib/libnova-0.7.so.0
> /usr/lib/libnova-0.7.so.0.0.0
> /usr/lib/libnova.a
> /usr/lib/libnova.la
> /usr/lib/libnova.so
> 
> Файл /usr/include/libnova.h содержит:
> struct ln_date
> {
>     int years;          /*!< Years. All values are valid */
>     int months;         /*!< Months. Valid values : 1 (January) - 12 (December) */
>     int days;           /*!< Days. Valid values 1 - 28,29,30,31 Depends on month.*/
>     int hours;          /*!< Hours. Valid values 0 - 23. */
>     int minutes;        /*!< Minutes. Valid values 0 - 59. */
>     double seconds;     /*!< Seconds. Valid values 0 -	59.99999.... */
> };
> double get_julian_day (struct ln_date * date);
> Программа такова:
> $ cat  proba.c
> #include "libnova.h"
> #include <stdio.h>
> #include <stdlib.h>
> int main ()
> {
>     double JD;
>     struct ln_date date;
>     date.years = 2003;
>     date.months = 5;
>     date.days = 21;
>     date.hours = 0;
>     date.minutes = 0;
>     date.seconds = 0;
>     JD = get_julian_day (&date);
>     printf ("JD: %s", JD);
>     return (0);
> }
> 
> Результат компиляции таков:
> $ gcc proba.c -o proba
gcc proba.c -lnova -o proba
> /home/vic/tmp/cc7z8m4y.o: In function `main':
> /home/vic/tmp/cc7z8m4y.o(.text+0x3f): undefined reference to `get_julian_day'
> collect2: ld returned 1 exit status
> 
> Что надо доделать?
> 
> Спасибо.
> 
> _______________________________________________
> Community mailing list
> Community@altlinux.ru
> http://www.altlinux.ru/mailman/listinfo/community
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Comm] JT Help for compile
  2003-06-04 19:24 ` Pavel S. Khmelinsky
@ 2003-06-05  5:22   ` viro
  2003-06-05  5:26     ` Pavel S. Khmelinsky
  0 siblings, 1 reply; 6+ messages in thread
From: viro @ 2003-06-05  5:22 UTC (permalink / raw)
  To: community

> gcc proba.c -lnova -o proba
Спасибо! А я дурак пробовал
$gcc proba.c -llibnova -o proba



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Comm] JT Help for compile
  2003-06-05  5:22   ` viro
@ 2003-06-05  5:26     ` Pavel S. Khmelinsky
  2003-06-07 19:17       ` [Comm] Re: JT Help for compile --> JT! Michael Shigorin
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel S. Khmelinsky @ 2003-06-05  5:26 UTC (permalink / raw)
  To: community

>>gcc proba.c -lnova -o proba
> 
> Спасибо! А я дурак пробовал
> $gcc proba.c -llibnova -o proba
все через это прошли :)
Лучший учебник
make -n all
какого-нибудь пакета и см. вывод



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Comm] Re: JT Help for compile --> JT!
  2003-06-05  5:26     ` Pavel S. Khmelinsky
@ 2003-06-07 19:17       ` Michael Shigorin
  2003-06-07 19:59         ` Pavel S. Khmelinsky
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Shigorin @ 2003-06-07 19:17 UTC (permalink / raw)
  To: community

On Thu, Jun 05, 2003 at 09:26:25AM +0400, Pavel S. Khmelinsky wrote:
> >>gcc proba.c -lnova -o proba
> >Спасибо! А я дурак пробовал $gcc proba.c -llibnova -o proba
> все через это прошли :)

Дык.  Надо написать libame == libAmateursMayEnjoy :)
с подсказкой :)

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Comm] Re: JT Help for compile --> JT!
  2003-06-07 19:17       ` [Comm] Re: JT Help for compile --> JT! Michael Shigorin
@ 2003-06-07 19:59         ` Pavel S. Khmelinsky
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel S. Khmelinsky @ 2003-06-07 19:59 UTC (permalink / raw)
  To: community


Michael Shigorin wrote:
> On Thu, Jun 05, 2003 at 09:26:25AM +0400, Pavel S. Khmelinsky wrote:
> 
>>>>gcc proba.c -lnova -o proba
>>>
>>>Спасибо! А я дурак пробовал $gcc proba.c -llibnova -o proba
>>
>>все через это прошли :)
> 
> 
> Дык.  Надо написать libame == libAmateursMayEnjoy :)
> с подсказкой :)
> 
Хмм... не понял шутки :)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-06-07 19:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-04 18:15 [Comm] JT Help for compile viro
2003-06-04 19:24 ` Pavel S. Khmelinsky
2003-06-05  5:22   ` viro
2003-06-05  5:26     ` Pavel S. Khmelinsky
2003-06-07 19:17       ` [Comm] Re: JT Help for compile --> JT! Michael Shigorin
2003-06-07 19:59         ` Pavel S. Khmelinsky

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git