From: viro@mail.ru To: ALT Linux Mailing List <community@altlinux.ru> Subject: [Comm] JT Help for compile Date: Wed, 4 Jun 2003 22:15:41 +0400 Message-ID: <20030604181541.GA914@vic.office.cint.ru> (raw) Очень нужно получать для себя несколько цифр в удобной форме Есть и установленна библиотека 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 Что надо доделать? Спасибо.
next reply other threads:[~2003-06-04 18:15 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-06-04 18:15 viro [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030604181541.GA914@vic.office.cint.ru \ --to=viro@mail.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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