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
* 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
[parent not found: <1dbb5dd90906251156v6fec5ffbx749d7d0ce7914b07@mail.gmail.com>]

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).