🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

(Summary) Function export problem when porting MSC code to BC 2.0

#350
From: Jin Tonic Li
Date: Tue, 14 Apr 1992 03:28
40 lines
2197 bytes
In article <92Apr10.183524edt.144354@explorer.dgp.toronto.edu>, I wrote:
> I am porting a windows app written with MSC 6.0 and SDK 3.0 to BC++ 2.0
> The C source codes compiled fine with minor changes to associate function
> prototypes with each individual module vs putting all of them in one 
> .h file and include it in all module files.
> 
> However, the linker gives warning about exporting dialog functions:
> 
> 	Attempt to export non-public symbol XXXXX
> 
> where XXXXX is the name of the dialog function.  The dialogs are called
> through MakeProcInstance(XXXXX, hInst) which are all listed under
> EXPORTS in .def file.
> 
> I have tried the options All windows functions exportable and Explicit
> export for BC++ 2.0  The linker still gives the same warning.
> 

First, thanks to all who offered help to solve this problem.

There are two ways to solve this:

1. using case-sensitive linker option, I have to list the dialog proc names
   in upper case in the .def file under the exports statement. (This seems
   to be a bug in BC++ since my dialog proc names are all in mixed case)

2. using non case-sensitive linker option, I just list the proc names(any
   combination of upper and lower case)

Since I used MakeProcInstance(), I don't seem to be able to use _export
in the declaration of the dialog proc.  The manual says that I also have
to list them in the .def file.

Hope this will help others who have encountered this problem.

--
Jin Li                               (416) 978-6619  //  Gin & Tonic mix well
Dynamic Graphics Project, Dept. of Computer Science  \\
University of Toronto, Ontario, Canada   M5S 1A1     //
jinli@dgp.utoronto.ca          uunet!utai!dgp!jinli  \\    No bugs, no bucks
Technical Details
Message-ID: <92Apr13.232808edt.144354@explorer.dgp.toronto.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!news-server.csri.toronto.edu!explorer.dgp.toronto.edu!jinli

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!news-server.csri.toronto.edu!explorer.dgp.toronto.edu!jinli
Newsgroups: comp.windows.ms.programmer
From: jinli@dgp.toronto.edu (Jin Tonic Li)
Subject: (Summary) Function export problem when porting MSC code to BC 2.0
Message-ID: <92Apr13.232808edt.144354@explorer.dgp.toronto.edu>
Organization: Department of Computer Science, University of Toronto
Distribution: na
Date: 14 Apr 92 03:28:36 GMT
Lines: 40