🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2017

Re: Export errors.

#2017
From: Rhoda Neimand
Date: Wed, 16 Dec 1992 16:16
43 lines
2072 bytes
In article <724094154.AA00845@etcetc.fidonet.org> smythee@etcetc.fidonet.org (Ean Smythe) writes:
>
>    I'm compiling a Windows application (Microsoft v7) in C.  I ran across
>a "symbol defined more than once", which turned out to be ok, I just didn't
>have the /NOI (NOIGNORECASE) switch on for LINK...
>
>    So I add the /NOI switch to my makefile, and all of a sudden, I get
>the following group of errors :
>
>LINK : error L2022: MainWndProc (alias MainWndProc) : export undefined
>LINK : error L2022: Sale (alias Sale) : export undefined
>LINK : error L2022: NewInv (alias NewInv) : export undefined
>
>    and so on, for every single one of my exported functions.  They *are*
>listed in the .DEF file like always.
>
>    I took the /NOI switch out, and it compiled without errors.
>
>    What's happening?
>

Probably the following:

Routines that you want to export that are not _pascal require an underbar
in the export list of the .def file, e.g. _Sale.  Note that routines
that do not explicitly use the _pascal modifier are, by default, _cdecl
and _cdecl requires the underbar.

Routines that you want to export that do use the _pascal modifier don't
require the underbar.

Any routine that you export that will be called back by someone else,
like Windows or a DLL of your own, must use the _pascal modifier.

Summary:

_pascal modifer               : no underbar in export list
no modifier (which is _cdecl) : underbar in export list

--
Rhoda Neimand			                [I speak for myself]
{sun,lll-tis,pyramid,pacbell}!sybase!rhoda -or- rhoda@sybase.com
"I didn't want to, Jim"		Mr. Spock in _This Side Of Paradise_
Technical Details
Message-ID: <27227@sybase.sybase.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!mtxinu!sybase!rhoda
References: <724094154.AA00845@etcetc.fidonet.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!mtxinu!sybase!rhoda
From: rhoda@sybase.com (Rhoda Neimand)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Export errors.
Message-ID: <27227@sybase.sybase.com>
Date: 16 Dec 92 16:16:10 GMT
References: <724094154.AA00845@etcetc.fidonet.org>
Sender: news@Sybase.COM
Organization: Sybase, Inc.
Lines: 43