From: Sergey Shilov <hsv@dstszi.gov.ua>
To: community@altlinux.ru
Subject: Re: [Comm] Как в проекте KDevelop прилинковать библиотеку
Date: Thu, 20 May 2004 11:42:04 +0300
Message-ID: <200405201142.06951.hsv@dstszi.gov.ua> (raw)
In-Reply-To: <40AC60E6.7030601@protei.ru>
В сообщении от 20 Май 2004 10:40 Максим написал(a):
>
> какой KDevelop?
>
3.0.3 в составе KDE 3.2.2
Собственно упрощенный тестовый пример (md5.c) печатающий МД5
дайджест аргумента командной строки
-------------------------------------------------------
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <md5.h>
char* md5(const char *s) {
struct md5_ctx ctx;
char *buf;
buf = ( char *) malloc( 32 + 1 );
md5_buffer(s, strlen(s), buf) ;
return buf;
}
int main(int argc, char *argv[]) {
if ( argc < 2 ) {
printf("use %s VALUE\n", argv[0]);
printf(" whetre VALUE - is a string for process digest\n",
argv[0]) ;
return -1;
}
printf( "%s\n" , md5 ( argv[1]) ) ;
return EXIT_SUCCESS;
}
----------------------------------------------------------------
На ура собирается и работает
gcc md5c.c -L. /lib/libcrypt.so.1 -o md5
--
С уважением
Сергей Шилов
next prev parent reply other threads:[~2004-05-20 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-19 15:11 Sergey Shilov
2004-05-20 7:40 ` Максим
2004-05-20 8:42 ` Sergey Shilov [this message]
2004-05-20 9:56 ` [Comm] Как в проекте KDevelop прилинковать библиотеку [JT] Sergey Shilov
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=200405201142.06951.hsv@dstszi.gov.ua \
--to=hsv@dstszi.gov.ua \
--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