public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* undefined reference
@ 1997-10-13 19:00 Tim Newsham
  1997-10-14  4:29 ` Gunther Ebert
  0 siblings, 1 reply; 7+ messages in thread
From: Tim Newsham @ 1997-10-13 19:00 UTC (permalink / raw)
  To: gnu-win32

Hi,

   I found a reference to a function named "NetEnumerateTrustedDomains"
and wanted to use it.  I found it listed in the microsoft headers
in <LMACCESS.H> as:

    NTSTATUS
    NetEnumerateTrustedDomains (
        IN LPWSTR ServerName OPTIONAL,
        OUT LPWSTR *DomainNames
        );

so I made a test case using:

    #include <windows.h>

    DWORD STDCALL NetEnumerateTrustedDomains(LPWSTR, LPWSTR *);
    [... some code ...]

but when I went to link it I got an unresolved error:

    C:\TEMP\cc0010491.o(.text+0x36):doms.c: undefined 
    reference to `NetEnumerateTrustedDomains@8'

so I checked through the libnetapi32.a and found it missing:

    % nm libnetapi32.a |grep NetEnum
    [nothing]

If I look at the netapi32.dll in quikview, its in there:

    Export Table
    Ordinal  Entry Point  Name
    0044     00010786     NetEnumerateTrustedDomains

So the questions

  - why isnt this function in the generated .a?
  - how is it decided which functions are put into the generated .a's?
  - can I call this function without building a new .a?  or can
    I generate a minimal .a that will let me call this function?
  - how can I make a new libnetapi32.a that has this function referenced?

                                          Tim N.

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

* Re: undefined reference
  1997-10-13 19:00 undefined reference Tim Newsham
@ 1997-10-14  4:29 ` Gunther Ebert
  1997-10-14 19:54   ` Tim Newsham
  0 siblings, 1 reply; 7+ messages in thread
From: Gunther Ebert @ 1997-10-14  4:29 UTC (permalink / raw)
  To: Tim Newsham; +Cc: gnu-win32

Tim Newsham wrote:
> 
> Hi,
> 
>    I found a reference to a function named "NetEnumerateTrustedDomains"
> and wanted to use it.  I found it listed in the microsoft headers
> in <LMACCESS.H> as:
> 
>     NTSTATUS
>     NetEnumerateTrustedDomains (
>         IN LPWSTR ServerName OPTIONAL,
>         OUT LPWSTR *DomainNames
>         );
> 
> so I made a test case using:
> 
>     #include <windows.h>
> 
>     DWORD STDCALL NetEnumerateTrustedDomains(LPWSTR, LPWSTR *);
>     [... some code ...]
> 
> but when I went to link it I got an unresolved error:
> 
>     C:\TEMP\cc0010491.o(.text+0x36):doms.c: undefined
>     reference to `NetEnumerateTrustedDomains@8'
> 
> so I checked through the libnetapi32.a and found it missing:
> 
>     % nm libnetapi32.a |grep NetEnum
>     [nothing]
>

It is really not there. You will either have to build a new import library
for netapi32.dll. Look for netapi32.def in the CDK source tree (winsup/sysdef I believe)
and add a line 

NetEnumerateTrustedDomains@8

without any @xx stuff. If the other function names in the netapi32.def file
have preceding underscores add one also the new line.

Build the import library by executing dlltool:

dlltool -k --dllname netapi32.dll --output-lib libnetapi32.a --def netapi32.def

If the functions names in netapi32.def have preceding underscores add
the '-U' option to the dlltool command line.


> If I look at the netapi32.dll in quikview, its in there:
> 
>     Export Table
>     Ordinal  Entry Point  Name
>     0044     00010786     NetEnumerateTrustedDomains
> 
> So the questions
> 
>   - why isnt this function in the generated .a?

It has probably been forgotten, perhaps because this function isn't documented
at least in the MSDN library.

>   - how is it decided which functions are put into the generated .a's?

One has to write the import definition files manually.

>   - can I call this function without building a new .a?  or can
>     I generate a minimal .a that will let me call this function?

I think it doesn't make much sense to create a new minimal import library
for just one function. Create a new libnetapi32.a library instead.
However, you can call this function also without creating a new import library
(error checking code omitted):

typedef DWORD STDCALL (*fntype)(LPWSTR, LPWSTR *);

void foo(LPWSTR servername, LPWSTR *domains)
{
  HANDLE hNetApiDLL = LoadLibrary("netapi32.dll");
  fntype fptr = (fntype)
	GetProcAddress(hNetApiDLL, "NetEnumerateTrustedDomains");

  (*fptr)(servername, domains);
}

>   - how can I make a new libnetapi32.a that has this function referenced?

described above

> 
>                                           Tim N.
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".

-- 

Gunther Ebert
iXOS Anwendungs-Software GmbH
Angerstrasse 40-42
D-04177 Leipzig

Phone : +49 341 48503-0
Fax   : +49 341 48503-99
E-mail: mailto:gunther.ebert@ixos-leipzig.de
www   : http://www.ixos-leipzig.de
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

* Re: undefined reference
  1997-10-14  4:29 ` Gunther Ebert
@ 1997-10-14 19:54   ` Tim Newsham
  0 siblings, 0 replies; 7+ messages in thread
From: Tim Newsham @ 1997-10-14 19:54 UTC (permalink / raw)
  To: Gunther Ebert; +Cc: newsham, gnu-win32

> It is really not there. You will either have to build a new import library
> for netapi32.dll. Look for netapi32.def in the CDK source tree (winsup/sysdef I believe)
> and add a line 
> 
> NetEnumerateTrustedDomains@8
> 
> without any @xx stuff. If the other function names in the netapi32.def file
> have preceding underscores add one also the new line.
> 
> Build the import library by executing dlltool:
> 
> dlltool -k --dllname netapi32.dll --output-lib libnetapi32.a --def netapi32.def

thanks.  That worked.  I had to leave the "@8" on though (following
the exaple of the other entries in the file).  Btw, what is
the @8 used for and how is it generated?

                                         Tim N.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

* Re: undefined reference
  2009-06-27  1:20   ` Sisyphus
@ 2009-07-01 13:54     ` Winderson Martins de Souza
  0 siblings, 0 replies; 7+ messages in thread
From: Winderson Martins de Souza @ 2009-07-01 13:54 UTC (permalink / raw)
  To: Sisyphus; +Cc: cygwin

Hi Rob, thanks for your reply..
Sorry, but I didn't understand what you said by strike, bu when I trie
the normal configure, I get the following output:

69: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:36
4: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:33
02: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:36
4: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:32
62: undefined reference to `_xasprintf'
.libs/format-scheme.o: In function `parse_upto':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/../gnulib-lib/xall
oc.h:94: undefined reference to `_xmalloc'
.libs/format-scheme.o: In function `parse_upto':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:29
72: undefined reference to `_xasprintf'
.libs/format-scheme.o: In function `parse_upto':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/../gnulib-lib/xall
oc.h:93: undefined reference to `_xalloc_die'
.libs/format-scheme.o: In function `parse_upto':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:36
4: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:21
35: undefined reference to `_gcd'
.libs/format-scheme.o: In function `parse_upto':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/../gnulib-lib/xall
oc.h:94: undefined reference to `_xmalloc'
.libs/format-scheme.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:33
62: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-scheme.c:33
54: undefined reference to `_xstrdup'
.libs/format-java.o: In function `message_format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:190:
 undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:328:
 undefined reference to `_freea'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:198:
 undefined reference to `_xmmalloca'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:345:
 undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:333:
 undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:284:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:253:
 undefined reference to `_freea'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:253:
 undefined reference to `_freea'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:204:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:250:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:253:
 undefined reference to `_freea'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:322:
 undefined reference to `_xasprintf'
.libs/format-java.o: In function `choice_format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:601:
 undefined reference to `_freea'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:588:
 undefined reference to `_xmmalloca'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:571:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:582:
 undefined reference to `_xasprintf'
.libs/format-java.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:689:
 undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-java.c:667:
 undefined reference to `_xasprintf'
.libs/format-csharp.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-csharp.c:17
0: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-csharp.c:15
9: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-csharp.c:15
9: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-csharp.c:13
8: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-csharp.c:12
9: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-csharp.c:13
8: undefined reference to `_xasprintf'
.libs/format-awk.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:453:
undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:346:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:346:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:369:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:390:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:340:
undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:219:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:431:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:198:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:304:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:382:
undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:258:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:136:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-awk.c:283:
undefined reference to `_xrealloc'
.libs/format-pascal.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:34
2: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:25
4: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:26
3: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:25
4: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:24
8: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:32
0: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:18
8: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-pascal.c:21
5: undefined reference to `_xrealloc'
.libs/format-ycp.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-ycp.c:100:
undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-ycp.c:89:
u
ndefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-ycp.c:83:
u
ndefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-ycp.c:89:
u
ndefined reference to `_xasprintf'
.libs/format-tcl.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:334:
undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:264:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:273:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:312:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:264:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:258:
undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:192:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:217:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-tcl.c:148:
undefined reference to `_xasprintf'
.libs/format-perl.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:525:
 undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:454:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:258:
 undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:466:
 undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:297:
 undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:454:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:503:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:448:
 undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:342:
 undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:209:
 undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:432:
 undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl.c:242:
 undefined reference to `_xrealloc'
.libs/format-perl-brace.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl-brace.
c:97: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl-brace.
c:139: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-perl-brace.
c:106: undefined reference to `_xrealloc'
.libs/format-php.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:291:
undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:163:
undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:223:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:269:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:232:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:223:
undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:217:
undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-php.c:143:
undefined reference to `_xasprintf'
.libs/format-gcc-internal.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:567: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:253: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:545: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:483: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:460: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:504: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:356: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:332: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:326: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:320: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:404: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:496: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:460: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:213: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:448: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-gcc-interna
l.c:377: undefined reference to `_xrealloc'
.libs/format-qt.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-qt.c:118:
u
ndefined reference to `_xmalloc'
.libs/format-kde.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-kde.c:166:
undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-kde.c:107:
undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-kde.c:157:
undefined reference to `_xasprintf'
.libs/format-boost.o: In function `format_parse':
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:561
: undefined reference to `_xmalloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:476
: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:269
: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:497
: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:431
: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:335
: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:539
: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:431
: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:425
: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:358
: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:443
: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:448
: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:489
: undefined reference to `_xstrdup'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:308
: undefined reference to `_xasprintf'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:246
: undefined reference to `_xrealloc'
/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-tools/src/format-boost.c:219
: undefined reference to `_xasprintf'
Creating library file: .libs/libgettextsrc.dll.a
collect2: ld returned 1 exit status
make[4]: *** [libgettextsrc.la] Error 1
make[4]: Leaving directory
`/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-
tools/src'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-
tools/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-
tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/home/Winmat/cygwin-ports/ports/branches/cygwin-1.5/devel/gettext/gettext-0.17/gettext-
tools'
make: *** [all-recursive] Error 1

2009/6/26 Sisyphus <sisyphus1@optusnet.com.au>:
>
> ----- Original Message ----- From: "Winderson Martins de Souza"
> <bugman.os@ig.com.br>
> To: <cygwin@cygwin.com>; <cygwin-sc@cygwin.com>
> Sent: Friday, June 26, 2009 11:32 PM
> Subject: Fwd: undefined reference
>
>
>> Hello, I'm trying to compile gettext on cygwin, but I'm
>> getting an undefined reference error, could anyone help?? I'm running
>> configure without shared library, as with it I was getting another
>> undefined error
>
> [snip]
>
>> msgcat-c++msgcat.o:c++msgcat.cc:(.text+0x701): undefined reference to
>> `__imp__color_test_mode'
>
> The '__imp' prefix signifies a shared library - so, if (as I suspect) this
> symbol is supposed to be resolved by the gettext library, then the message
> that you've got a *static* library hasn't "got through".
>
> It may, in fact, be simpler to build a shared library. What 'undefined
> reference' did you strike when you tried that ?
>
> Cheers,
> Rob
>

--
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] 7+ messages in thread

* Re: undefined reference
  2009-06-26 14:14 ` Fwd: undefined reference Winderson Martins de Souza
@ 2009-06-27  1:20   ` Sisyphus
  2009-07-01 13:54     ` Winderson Martins de Souza
  0 siblings, 1 reply; 7+ messages in thread
From: Sisyphus @ 2009-06-27  1:20 UTC (permalink / raw)
  To: Winderson Martins de Souza, cygwin


----- Original Message ----- 
From: "Winderson Martins de Souza" <bugman.os@ig.com.br>
To: <cygwin@cygwin.com>; <cygwin-sc@cygwin.com>
Sent: Friday, June 26, 2009 11:32 PM
Subject: Fwd: undefined reference


> Hello, I'm trying to compile gettext on cygwin, but I'm
> getting an undefined reference error, could anyone help?? I'm running
> configure without shared library, as with it I was getting another
> undefined error

[snip]

> msgcat-c++msgcat.o:c++msgcat.cc:(.text+0x701): undefined reference to
> `__imp__color_test_mode'

The '__imp' prefix signifies a shared library - so, if (as I suspect) this 
symbol is supposed to be resolved by the gettext library, then the message 
that you've got a *static* library hasn't "got through".

It may, in fact, be simpler to build a shared library. What 'undefined 
reference' did you strike when you tried that ?

Cheers,
Rob 


--
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] 7+ messages in thread

* Undefined Reference
  1999-05-17 16:53 Undefined Reference dale henderson
@ 1999-05-31 21:10 ` dale henderson
  0 siblings, 0 replies; 7+ messages in thread
From: dale henderson @ 1999-05-31 21:10 UTC (permalink / raw)
  To: cygwin

Here is my scenario:

I have mingw32/egcs1.1.2

Compiling source file for an executable.
There are two static libraries: one libglcanvas.a makes reference to the 
other libopengl32.a.
The source file  penguin.cpp also makes reference to libopengl32.a and does 
so successfully when make does the linking, but the linking to libopengl32.a 
from libglcanvas.a fails causing undefined references.

The source file uses makeprog.g95. When libglcanvas.a was compiled, it used 
makelib.g95. This is the only discernable difference I see.
There is no linking involved when creating a static library in mingw32, 
correct?

Any suggestions?

dalehend@netscape.net









_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Undefined Reference
@ 1999-05-17 16:53 dale henderson
  1999-05-31 21:10 ` dale henderson
  0 siblings, 1 reply; 7+ messages in thread
From: dale henderson @ 1999-05-17 16:53 UTC (permalink / raw)
  To: cygwin

Here is my scenario:

I have mingw32/egcs1.1.2

Compiling source file for an executable.
There are two static libraries: one libglcanvas.a makes reference to the 
other libopengl32.a.
The source file  penguin.cpp also makes reference to libopengl32.a and does 
so successfully when make does the linking, but the linking to libopengl32.a 
from libglcanvas.a fails causing undefined references.

The source file uses makeprog.g95. When libglcanvas.a was compiled, it used 
makelib.g95. This is the only discernable difference I see.
There is no linking involved when creating a static library in mingw32, 
correct?

Any suggestions?

dalehend@netscape.net









_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2009-07-01 13:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-13 19:00 undefined reference Tim Newsham
1997-10-14  4:29 ` Gunther Ebert
1997-10-14 19:54   ` Tim Newsham
1999-05-17 16:53 Undefined Reference dale henderson
1999-05-31 21:10 ` dale henderson
     [not found] <1dbb5dd90906251156v6fec5ffbx749d7d0ce7914b07@mail.gmail.com>
2009-06-26 14:14 ` Fwd: undefined reference Winderson Martins de Souza
2009-06-27  1:20   ` Sisyphus
2009-07-01 13:54     ` Winderson Martins de Souza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).