Subject: undefined reference
From: [email-masked] (Tim Newsham)

13 Oct 1997 23:51:43 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
To: [email-masked]

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
"[email-masked]" with one line of text: "help".