* Re: Updated: libunistring 0.9.5-1
2015-04-10 14:58 ` Updated: libunistring 0.9.5-1 Nellis, Kenneth
@ 2015-04-10 15:18 ` René Berber
2015-04-10 15:18 ` Lemke, Michael ST/HZA-ZSW
2015-04-10 15:19 ` Marco Atzeri
2 siblings, 0 replies; 5+ messages in thread
From: René Berber @ 2015-04-10 15:18 UTC (permalink / raw)
To: cygwin
On 4/10/2015 9:58 AM, Nellis, Kenneth wrote:
[snip]
> It compiles fine, but I don't know how to get it to link.
>
> $ gcc -lunistring unicode_character_name.c
The order is important on Cygwin, try:
gcc -o unicode_character_name unicode_character_name.c -lunistring
> libunistring.dll.a, the "dll" part of which seems odd to me
That's the way it works, a stub library (needed by the linker) with the
contents of the (real) dynamic library (i.e. there is a corresponding
lib<name>.dll).
--
René Berber
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Updated: libunistring 0.9.5-1
2015-04-10 14:58 ` Updated: libunistring 0.9.5-1 Nellis, Kenneth
2015-04-10 15:18 ` René Berber
@ 2015-04-10 15:18 ` Lemke, Michael ST/HZA-ZSW
2015-04-10 15:22 ` Nellis, Kenneth
2015-04-10 15:19 ` Marco Atzeri
2 siblings, 1 reply; 5+ messages in thread
From: Lemke, Michael ST/HZA-ZSW @ 2015-04-10 15:18 UTC (permalink / raw)
To: Nellis, Kenneth; +Cc: cygwin
>On Friday, April 10, 2015 4:59 PM Nellis, Kenneth wrote:
>Then wrote what I thought would be a trivial first program.
...
>It compiles fine, but I don't know how to get it to link.
>
>$ gcc -lunistring unicode_character_name.c
>/tmp/ccaJ19ki.o:unicode_character_name.c:(.text+0x57): undefined reference to `unicode_character_name'
>/tmp/ccaJ19ki.o:unicode_character_name.c:(.text+0x57): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `unicode_character_name'
>collect2: error: ld returned 1 exit status
>$
>
>Ideas?
Try
$ gcc unicode_character_name.c -lunistring
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Updated: libunistring 0.9.5-1
2015-04-10 14:58 ` Updated: libunistring 0.9.5-1 Nellis, Kenneth
2015-04-10 15:18 ` René Berber
2015-04-10 15:18 ` Lemke, Michael ST/HZA-ZSW
@ 2015-04-10 15:19 ` Marco Atzeri
2 siblings, 0 replies; 5+ messages in thread
From: Marco Atzeri @ 2015-04-10 15:19 UTC (permalink / raw)
To: cygwin
On 4/10/2015 4:58 PM, Nellis, Kenneth wrote:
> I thought I'd play with libunistring so for the first
> time I downloaded the following packages:
>
>
> Then wrote what I thought would be a trivial first program.
>
> #include <uniname.h>
> #include <stdio.h>
> int main (void)
> {
> char buffer[UNINAME_MAX] = "(undefined)";
> ucs4_t uc = 0x20AC; /* euro symbol */
> unicode_character_name (uc, buffer);
> puts (buffer);
> return 0;
> }
>
> It compiles fine, but I don't know how to get it to link.
>
> $ gcc -lunistring unicode_character_name.c
> /tmp/ccaJ19ki.o:unicode_character_name.c:(.text+0x57): undefined reference to `unicode_character_name'
> /tmp/ccaJ19ki.o:unicode_character_name.c:(.text+0x57): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `unicode_character_name'
> collect2: error: ld returned 1 exit status
> $
>
try in this way:
$ gcc unicode_character_name.c -lunistring
order matters on Windows
> --Ken Nellis
Regards MArco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread