delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/13/23:51:43

From: newsham AT aloha DOT net (Tim Newsham)
Subject: undefined reference
13 Oct 1997 23:51:43 -0700 :
Message-ID: <199710140049.OAA26629.cygnus.gnu-win32@haleakala.aloha.net>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com


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 AT 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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019