🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2553

Re: Solution to BC++ Petzold problem, and mild bug report

#2553
From: H. G. "Butch" Walker Jr.
Date: Thu, 09 May 1991 21:08
32 lines
1990 bytes
In article <2828D392.40DD@wilbur.coyote.trw.com>, rich@wiley.uucp (Rich
Messenger) writes:

|>I recently posted a question about wierd behavior trying to get
|>Petzold's first sample program from _Programming Windows_ to run under
|>BC++.  Although there were no reposnses from this news group, I
|>eventually tracked down the problem and thought I might be of general
|>interest to other BC++ users.
|>
|>(1) When you are compiling as C++, you *cannot* use the EXPORTS section
|>in the .DEF file, since the name is mangled by C++ before the linker
|>ever sees it.  This tidbit is not mentioned in the documentation.
|>
|>(2) You can use "smart callbacks" and thigs work great as long as
|>you're not writing a DLL or using the huge memory model.
|>
|>(3) You can tag exportable functions with "_export".  You *must* put
|>this keyword in both the function declaration and function definition.
|>MILD BUG: BC++ does not complain if you declare the function without
|>_export, and define it with _export; it simply exhibits wierd behavior
|>on execution.
|>

Would someone please explain this to me.  I recently copied the SysMets 
program from the book and it worked just fine.  I didn't use the _export
tag but simply used the EXPORTS section of the DEF.  It seemed to work
fine.  Was it really messed up but I just didn't notice?  
Response by e-mail is fine.

Thanks in advance,

Butch
Technical Details
Message-ID: <1991May9.160511@geohub.gcn.uoknor.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!uokmax!geohub.gcn.uoknor.edu!butch
References: <2828D392.40DD@wilbur.coyote.trw.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!uokmax!geohub.gcn.uoknor.edu!butch
From: butch@geohub.gcn.uoknor.edu (H. G. "Butch" Walker Jr.)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Solution to BC++ Petzold problem, and mild bug report
Message-ID: <1991May9.160511@geohub.gcn.uoknor.edu>
Date: 9 May 91 21:08:54 GMT
References: <2828D392.40DD@wilbur.coyote.trw.com>
Sender: news@uokmax.ecn.uoknor.edu (Nets)
Reply-To: butch@geopix.gcn.uoknor.edu
Organization: Geosciences Computing Network, Univ. of Oklahoma
Lines: 32