From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Newsham To: gnu-win32@cygnus.com Subject: undefined reference Date: Mon, 13 Oct 1997 19:00:00 -0000 Message-id: <199710140049.OAA26629@haleakala.aloha.net> X-SW-Source: 1997-10/msg00271.html Hi, I found a reference to a function named "NetEnumerateTrustedDomains" and wanted to use it. I found it listed in the microsoft headers in as: NTSTATUS NetEnumerateTrustedDomains ( IN LPWSTR ServerName OPTIONAL, OUT LPWSTR *DomainNames ); so I made a test case using: #include 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".