www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



c++ - Module Definitions

↑ ↓ ← "Default User" <user hotmail.com> writes:
Is there an automated way to create module definitions .def file froma
dll?

-- 
Sep 09 2007
↑ ↓ "Default User" <user hotmail.com> writes:
I'm using Digital Mars command-line C++ compiler.

I have to use module definition files as described in FAQ to translate
function names:

  	LIBRARY wsock32
	EXETYPE NT
      SUBSYSTEM WINDOWS
      EXPORTS
          _gethostbyname 4  = gethostbyname

That's the only was I can get DM to work, otherwise it spits out a
bunch of "Symbol Undefined" errors.

But as you can imagine there are hundreds of funtions that have to be
translated via module definition files.

I looked all over the website, but it doesn't describe an automated way
to do this anywhere...

Any advise?

-- 
Sep 09 2007
↑ ↓ Walter Bright <newshound1 digitalmars.com> writes:
Are you trying to convert wsock32.lib from COFF to an OMF import library?
Sep 10 2007
↑ ↓ Default User <user hotmail.com> writes:
On Mon, 10 Sep 2007 11:01:57 -0700, Walter Bright wrote:

 Are you trying to convert wsock32.lib from COFF to an OMF import library?

Hi Walter I'm trying to do what's described here: http://www.digitalmars.com/faq.html#sysimport I tried researching COFF vs OMF issue after reading your reply, but I don't quite understand it. Do you think that this trick with module definition file (as described in the above URL) actually performs OMF to COFF conversion? If that is the case, why wouldn't they just say so?! That entire paragraph doesn't even mention COFF or OMF... Do you think I can use some sort of OMF to COFF conversion utility instead of entering everything manually into Module Definition file?
Sep 13 2007
Bertel Brander <bertel post4.tele.dk> writes:
Default User skrev:
 On Mon, 10 Sep 2007 11:01:57 -0700, Walter Bright wrote:
 
 Are you trying to convert wsock32.lib from COFF to an OMF import library?

Hi Walter I'm trying to do what's described here: http://www.digitalmars.com/faq.html#sysimport

But the import library for most windows dlls is included in DMC. You don't normally need to create the libraries yourself.
Sep 13 2007
↑ ↓ Default User <user hotmail.com> writes:
On Thu, 13 Sep 2007 23:56:39 +0200, Bertel Brander wrote:

 You don't normally need to create the libraries yourself.

So what am I supposed to do? The wsock32.lib which is included by default cannot be used because of its format. Read the URL reference that I gave carefully. All the functions need to be changed from one format to another. If I try to compile without module definitions file, the linker gives out a bunch of "undefined symbol" errors. I also think I should not be creating all those libraries myself. Especially manually. So what should I do then? It DOES NOT work with the libraries the way they're supplied.
Sep 13 2007
↑ ↓ Bertel Brander <bertel post4.tele.dk> writes:
Default User skrev:
 On Thu, 13 Sep 2007 23:56:39 +0200, Bertel Brander wrote:
 
 You don't normally need to create the libraries yourself.

So what am I supposed to do? The wsock32.lib which is included by default cannot be used because of its format. Read the URL reference that I gave carefully. All the functions need to be changed from one format to another. If I try to compile without module definitions file, the linker gives out a bunch of "undefined symbol" errors. I also think I should not be creating all those libraries myself. Especially manually. So what should I do then? It DOES NOT work with the libraries the way they're supplied.

Sorry, I still can't see the problem. If I create a program: #include <windows.h> #include <stdio.h> int main() { WSADATA wsaData; WSAStartup(MAKEWORD(1, 1), &wsaData); struct hostent *h = gethostbyname("www.digitalmars.com"); if(h) printf("%u.%u.%u.%u\n", (unsigned char )h->h_addr_list[0][0], (unsigned char )h->h_addr_list[0][1], (unsigned char )h->h_addr_list[0][2], (unsigned char )h->h_addr_list[0][3]); else printf("To bad\n"); } And compile it with: dmc testing.cpp wsock32.lib It works rigth away, without any tricks or defintion files. The wsock32.lib file is the one supplied by Digital Mars. So why do you say it does not work? What happens if you try to compile the above program?
Sep 14 2007
↑ ↓ → Default User <user hotmail.com> writes:
On Fri, 14 Sep 2007 21:01:45 +0200, Bertel Brander wrote:

 Sorry, I still can't see the problem.
 
 If I create a program:
 
 And compile it with:
 dmc testing.cpp wsock32.lib
 
 It works rigth away, without any tricks or defintion files.
 The wsock32.lib file is the one supplied by Digital Mars.
 
 So why do you say it does not work?
 What happens if you try to compile the above program?

I'm sorry, I got confused in my last post. Your program indeed compiles. Also the example in that FAQ I quoted is misleading because wsock32.lib is supplied by DM and one does not need to translate wsock32 functions. Here is detailed explanation of what's happening in my case: Lets say I have c++ program test.cpp which uses WSAConnect function. WSAConnect is in ws2_32.dll I do: implib /s ws2_32.lib ws2_32.dll dmc test.cpp ws2_32.lib I get error: Error 42: Symbol Undefined _WSAConnect 28 So I need to create module definition file "ws2_32.def":
       LIBRARY wsock32
       EXETYPE NT
       SUBSYSTEM WINDOWS
       EXPORTS
           _WSAConnect 28  = WSAConnect

Then I do: implib ws2_32.lib ws2_32.def dmc test.cpp ws2_32.lib Now the code compiles. But what if the code contains hundreds of functions (like WSAConnect in the above example) which are not present in those 18 lib files supplied by DM? Am I supposed to create these module definition files manually by copy and paste even if there are hundreds of funtions?
Sep 15 2007
Walter Bright <newshound1 digitalmars.com> writes:
Default User wrote:
 Do you think I can use some sort of OMF to COFF conversion utility instead
 of entering everything manually into Module Definition file?

If you mean convert COFF to OMF, you can use \dm\bin\coffimplib.exe which comes with the extended utility package.
Sep 13 2007
↑ ↓ Walter Bright <newshound1 digitalmars.com> writes:
Default User wrote:
 On Thu, 13 Sep 2007 23:11:39 -0700, Walter Bright wrote:
 If you mean convert COFF to OMF, you can use \dm\bin\coffimplib.exe 
 which comes with the extended utility package.

You are either unable or unwilling to understand what my question is.

I mistyped. To create an OMF import library from a COFF import library, you can use coffimplib.exe. From reading your posts, that appears to be what you need.
Sep 14 2007
↑ ↓ Default User <user hotmail.com> writes:
On Fri, 14 Sep 2007 15:03:35 -0700, Walter Bright wrote:

 
 I mistyped. To create an OMF import library from a COFF import library, 
 you can use coffimplib.exe.
 
  From reading your posts, that appears to be what you need.

Thanks Walter, I tried coffimplib and it always says: Error: missing archive signature I read that it only works with microsoft import libraries (Are these the .lib files that would normally come with Microsoft Visual Studio?). But I only have dlls that normally come with Windows and whatever files came with dmc; I do not have those microsoft lib files. Is there a way to get them without MS Visual Studio? I would like dmc to be able to use functions from any windows dlls, without spending hours manually creating module definition files for hundreds of functions. I've described my problem in detail in this message: Message-ID: <fch3dt$kb1$1 digitalmars.com> Thanks a lot for all your help.
Sep 15 2007
↑ ↓ Walter Bright <newshound1 digitalmars.com> writes:
Default User wrote:
 On Fri, 14 Sep 2007 15:03:35 -0700, Walter Bright wrote:
 
 I mistyped. To create an OMF import library from a COFF import library, 
 you can use coffimplib.exe.

  From reading your posts, that appears to be what you need.

Thanks Walter, I tried coffimplib and it always says: Error: missing archive signature

Sounds like you tried running it on a DLL. It's designed to be run on a .LIB file in COFF format. A DLL is not a library.
 I read that it only works with microsoft import libraries (Are these the
 .lib files that would normally come with Microsoft Visual Studio?).

They come with the Microsoft Windows SDK as well as VS.
 But I
 only have dlls that normally come with Windows and whatever files came with
 dmc; I do not have those microsoft lib files. Is there a way to get them
 without MS Visual Studio?

I think the SDK is a free download from MS.
 I would like dmc to be able to use functions from any windows dlls, without
 spending hours manually creating module definition files for hundreds of
 functions. I've described my problem in detail in this message:
 
 Message-ID: <fch3dt$kb1$1 digitalmars.com>
 
 Thanks a lot for all your help.

The problem is Microsoft stripped information from the dlls, so an import library cannot be automatically generated from them. What they stripped are the 'mangled' names. There is no way for a program to insert the missing mangling text, as it is different for every function signature.
Sep 16 2007
↑ ↓ Default User <user hotmail.com> writes:
On Sun, 16 Sep 2007 18:04:27 -0700, Walter Bright wrote:

 The problem is Microsoft stripped information from the dlls, so an 
 import library cannot be automatically generated from them. What they 
 stripped are the 'mangled' names. There is no way for a program to 
 insert the missing mangling text, as it is different for every function 
 signature.

So my only solution is to install SDK? Couldn't DigitalMars just make more .lib files (to cover all Windows dll's, rather than just 18 supplied with DM)? If Digital Mars managed to create those 18, why cannot they create more, instead of having every user install SDK! I'm sure most users sooner or later need a function which is not included in those 18 libraries. Also one can circumvent the problem manually using module definition files, without having any extra info or knowing mangling text (as described in the URL I quoted). Why cannot the same process be done automatically?
Sep 16 2007
Andy C <no.no no.com> writes:
If I use Jan Kneper's version of implib (which I remamed implib_jk)
as follows and ask it to make an import lib file called
wsock32_dm.lib from wsock32.dll using the following command:

implib_jk /system /v /suffix /def /test /Ic:\dm\include\win32
wsock32_dm.lib wsock32.dll

I get wsock32_dm.lib to link with my program and and the following
output wsock32_dm.def:

EXPORTS
   _AcceptEx 32 = AcceptEx
   _EnumProtocolsA 12 = EnumProtocolsA
   _EnumProtocolsW 12 = EnumProtocolsW
   _GetAcceptExSockaddrs 32 = GetAcceptExSockaddrs
   _GetAddressByNameA 40 = GetAddressByNameA
   _GetAddressByNameW 40 = GetAddressByNameW
   _GetNameByTypeA 12 = GetNameByTypeA
   _GetNameByTypeW 12 = GetNameByTypeW
   _GetServiceA 28 = GetServiceA
   _GetServiceW 28 = GetServiceW
   _GetTypeByNameA 8 = GetTypeByNameA
   _GetTypeByNameW 8 = GetTypeByNameW
   _MigrateWinsockConfiguration = MigrateWinsockConfiguration
   _NPLoadNameSpaces = NPLoadNameSpaces
   _SetServiceA 24 = SetServiceA
   _SetServiceW 24 = SetServiceW
   _TransmitFile 28 = TransmitFile
   _WEP = WEP
   _WSAAsyncGetHostByAddr 28 = WSAAsyncGetHostByAddr
   _WSAAsyncGetHostByName 20 = WSAAsyncGetHostByName
   _WSAAsyncGetProtoByName 20 = WSAAsyncGetProtoByName
   _WSAAsyncGetProtoByNumber 20 = WSAAsyncGetProtoByNumber
   _WSAAsyncGetServByName 24 = WSAAsyncGetServByName
   _WSAAsyncGetServByPort 24 = WSAAsyncGetServByPort
   _WSAAsyncSelect 16 = WSAAsyncSelect
   _WSACancelAsyncRequest 4 = WSACancelAsyncRequest
   _WSACancelBlockingCall 0 = WSACancelBlockingCall
   _WSACleanup 0 = WSACleanup
   _WSAGetLastError 0 = WSAGetLastError
   _WSAIsBlocking 0 = WSAIsBlocking
   _WSARecvEx 16 = WSARecvEx
   _WSASetBlockingHook 4 = WSASetBlockingHook
   _WSASetLastError 4 = WSASetLastError
   _WSAStartup 8 = WSAStartup
   _WSAUnhookBlockingHook 0 = WSAUnhookBlockingHook
   _WSApSetPostRoutine = WSApSetPostRoutine
   ___WSAFDIsSet 8 = __WSAFDIsSet
   _accept 12 = accept
   _bind 12 = bind
   _closesocket 4 = closesocket
   _connect 12 = connect
   _dn_expand = dn_expand
   _gethostbyaddr 12 = gethostbyaddr
   _gethostbyname 4 = gethostbyname
   _gethostname 8 = gethostname
   _getnetbyname = getnetbyname
   _getpeername 12 = getpeername
   _getprotobyname 4 = getprotobyname
   _getprotobynumber 4 = getprotobynumber
   _getservbyname 8 = getservbyname
   _getservbyport 8 = getservbyport
   _getsockname 12 = getsockname
   _getsockopt 20 = getsockopt
   _htonl 4 = htonl
   _htons 4 = htons
   _inet_addr 4 = inet_addr
   _inet_network = inet_network
   _inet_ntoa 4 = inet_ntoa
   _ioctlsocket 12 = ioctlsocket
   _listen 8 = listen
   _ntohl 4 = ntohl
   _ntohs 4 = ntohs
   _rcmd = rcmd
   _recv 16 = recv
   _recvfrom 24 = recvfrom
   _rexec = rexec
   _rresvport = rresvport
   _s_perror = s_perror
   _select 20 = select
   _send 16 = send
   _sendto 24 = sendto
   _sethostname = sethostname
   _setsockopt 20 = setsockopt
   _shutdown 8 = shutdown
   _socket 12 = socket
Sep 17 2007
→ Default User <user hotmail.com> writes:
Sorry Walter, forget everyhting I've said. I didn't realize you were the
developer. 

Thanks for everybody's help, I've moved on to another compiler.
Sep 17 2007
→ Andy C <fg.jlf noname.com> writes:
  As I posted in the windows.32-bit forum, all you need is the DLL
and the header file and you are good to go.  I downloaded the
Windows platform SDK and started using GDI++ functions (I
needed .PNG output) by using JK's version of Implib.
  I recommend people take a look at the new MSSDK, there are a
bunch of usefull new functions and using it under DM is pretty easy.
Sep 18 2007
Walter Bright <newshound1 digitalmars.com> writes:
Default User wrote:
 Couldn't DigitalMars just make more .lib files (to cover all Windows dll's,
 rather than just 18 supplied with DM)? If Digital Mars managed to create
 those 18, why cannot they create more, instead of having every user install
 SDK! I'm sure most users sooner or later need a function which is not
 included in those 18 libraries.

Microsoft changes those libraries constantly.
 Also one can circumvent the problem manually using module definition files,
 without having any extra info or knowing mangling text (as described in the
 URL I quoted). Why cannot the same process be done automatically?

Because in the DLL will be a name like: AbcDef Yet the mangled name would be something like: AbcDef 8 How, by looking at the DLL, can the tool automatically guess the 8? or 4? or 16?
Sep 17 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
On Mon, 17 Sep 2007 23:46:59 -0400, Walter Bright  =

<newshound1 digitalmars.com> wrote:

 Also one can circumvent the problem manually using module definition =


 files, without having any extra info or knowing mangling text (as  =


 described in the URL I quoted). Why cannot the same process be done  =


 automatically?

Because in the DLL will be a name like: AbcDef Yet the mangled name would be something like: AbcDef 8 How, by looking at the DLL, can the tool automatically guess the 8? o=

  4? or  16?

While this thread ended rather rudely by Default User, it is timely for me, as I'm having a similar problem. I'm trying to use the Marshall Soft Windows Serial Communication Component Library (WSC4C) http://www.marshallsoft.com/ Free download for the evaluation version if anyone wants to share the pain. Following the various tips in this thread I've created this .DEF file: EXPORTS _SioBaud 8 =3D SioBaud _SioCTS 4 =3D SioCTS _SioDone 4 =3D SioDone _SioFlow 8 =3D SioFlow _SioGets 12 =3D SioGets _SioInfo 4 =3D SioInfo _SioKeyCode 4 =3D SioKeyCode _SioPutc 8 =3D SioPutc _SioReset 12 =3D SioReset _SioRxClear 4 =3D SioRxClear Yet I still get link errors: link simple.rsp,simple,simple,wsc32dm.lib,wsc32dm.def,simple.res OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioBaud OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioCTS OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDone OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioFlow OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioGets OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioInfo OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioKeyCode OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioPutc OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioReset OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioRxClear OPTLINK : Error 129: WeakLazyAlias Internal : SioDone --- errorlevel 11 This is the Makefile I created to build the WSC 'simple' example, converted from a BCC55 Makefile. # # Digital Mars makefile for SIMPLE [Win32] # # NOTE: Response file (simple.rsp) must NOT end with a carriage return, = = line feed. # # To use: "make -f simple32._d_" # CCFLAGS =3D -c -DWIN32 simple.exe: simple.res simple.obj wsc32dm.def wsc32dm.lib about.obj = line.obj paint.obj sioerror.obj link simple.rsp,simple,simple,wsc32dm.lib,wsc32dm.def,simple.res about.obj: about.c about.h dmc $(CCFLAGS) about.c simple.obj: simple.c simple.h wsc.h dmc $(CCFLAGS) simple.c sioerror.obj: sioerror.c sioerror.h wsc.h dmc $(CCFLAGS) sioerror.c paint.obj: paint.c paint.h dmc $(CCFLAGS) paint.c line.obj: line.c line.h wsc.h dmc $(CCFLAGS) line.c simple.res: simple.rc rcc -dWIN32 -D__NT__ simple.rc # Why did I need to add the -D__NT__? wsc32dm.lib: implib_jk /system /v /suffix /def /test /IG:\DM\include\win32 wsc32dm.l= ib = wsc32.dll
Sep 21 2007
→ Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 While this thread ended rather rudely by Default User, it is timely
 for me, as I'm having a similar problem.
 
 I'm trying to use the Marshall Soft
 Windows Serial Communication Component Library (WSC4C)
 http://www.marshallsoft.com/
 Free download for the evaluation version
 if anyone wants to share the pain.
 
 Following the various tips in this thread I've
 created this .DEF file:
 
 EXPORTS
    _SioBaud 8 = SioBaud
    _SioCTS 4 = SioCTS
    _SioDone 4 = SioDone
    _SioFlow 8 = SioFlow
    _SioGets 12 = SioGets
    _SioInfo 4 = SioInfo
    _SioKeyCode 4 = SioKeyCode
    _SioPutc 8 = SioPutc
    _SioReset 12 = SioReset
    _SioRxClear 4 = SioRxClear
 
 Yet I still get link errors:
 
 link  simple.rsp,simple,simple,wsc32dm.lib,wsc32dm.def,simple.res
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
 
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioBaud
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioCTS
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioDone
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioFlow
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioGets
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioInfo
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioKeyCode
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioPutc
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioReset
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioRxClear
 OPTLINK : Error 129: WeakLazyAlias Internal : SioDone
 
 --- errorlevel 11

That likely means that your import library, wsc32dm.lib, does not contain those names. I'd check it with a file dumper.
Sep 21 2007
AndyC <asmith yahoo.com> writes:
I posted how I used Jan Knepper's version of Implib.exe to imp-
lement the latest GDI+ from the MSSDK over at 'c++.windows.32-
bits'.  It will probably work for you as well.

Get the program at http://www.digitalmars.com/~jan/

Create an import lib using the program as follows:
 implib_jk /system /v /suffix /def /test /I. ***.lib
***.dll

Be sure you provide the path to all the header files.

The resulting ***.lib can then be linked into your project.
A files titled "***.cpp" was also created, may be useful.
Sep 24 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
On Mon, 24 Sep 2007 09:48:55 -0400, AndyC <asmith yahoo.com> wrote:

 I posted how I used Jan Knepper's version of Implib.exe to imp-
 lement the latest GDI+ from the MSSDK over at 'c++.windows.32-
 bits'.  It will probably work for you as well.

 Get the program at http://www.digitalmars.com/~jan/

Did that. Installed in G:\DM\bin. Renamed implib.ini to implib_jk.ini and fixed the path to SPPN therein.
 Create an import lib using the program as follows:
  implib_jk /system /v /suffix /def /test /I. ***.lib
 ***.dll

Did that.
 Be sure you provide the path to all the header files.

There is only wsc.h, which is in the same directory as the wsc32.dll file, so /I. is fine.
 The resulting ***.lib can then be linked into your project.

Still doesn't work. I spent the morning starting over with my Digital Mars 8.25 CD, and going through the tedious upgrading to 8.50. I'm wondering if I broke something else because now I have more errors (below) than I had on Friday. Got the same .DEF file as Friday: EXPORTS _SioBaud 8 =3D SioBaud _SioBrkSig 8 =3D SioBrkSig _SioCTS 4 =3D SioCTS _SioDCD 4 =3D SioDCD ... To answer Walters earlier comment about doing a hex dump of the .lib file: 00000000: F0 0D 00 00 0A 00 00 05 00 00 00 00 00 00 00 00 p............= ... 00000010: 80 0C 00 0A 5F 53 69 6F 42 61 75 64 40 38 00 88 ...._SioBaud = 8.. 00000020: 22 00 00 A0 01 00 0A 5F 53 69 6F 42 61 75 64 40 ".. ..._SioBa= ud 00000030: 38 09 77 73 63 33 32 2E 64 6C 6C 07 53 69 6F 42 8.wsc32.dll.S= ioB 00000040: 61 75 64 00 8A 02 00 00 00 00 00 00 00 00 00 00 aud..........= ... 00000050: 80 0E 00 0C 5F 53 69 6F 42 72 6B 53 69 67 40 38 ...._SioBrkSi= g 8 00000060: 00 88 26 00 00 A0 01 00 0C 5F 53 69 6F 42 72 6B ..&.. ..._Sio= Brk 00000070: 53 69 67 40 38 09 77 73 63 33 32 2E 64 6C 6C 09 Sig 8.wsc32.d= ll. 00000080: 53 69 6F 42 72 6B 53 69 67 00 8A 02 00 00 00 00 SioBrkSig....= ... 00000090: 80 0B 00 09 5F 53 69 6F 43 54 53 40 34 00 88 20 ...._SioCTS 4= .. 000000A0: 00 00 A0 01 00 09 5F 53 69 6F 43 54 53 40 34 09 .. ..._SioCTS= 4. 000000B0: 77 73 63 33 32 2E 64 6C 6C 06 53 69 6F 43 54 53 wsc32.dll.Sio= CTS ...
 A files titled "***.cpp" was also created, may be useful.

#include <windows.h> int main ( int, char **, char ** ) { SioBaud ( ( int ) 0, ( unsigned ) 0 ); SioBrkSig ( ( int ) 0, ( char ) 0 ); SioCTS ( ( int ) 0 ); ... } link simple.rsp,simple,simple,wsc32dm.lib,wsc32dm.def,simple.res OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioBaud OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioBrkSig OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioCTS OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDCD OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDSR OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDTR OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDebug OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDone OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioEvent OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioEventChar OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioEventWait OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioFlow OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioGetReg OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioGetc OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioGets OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioInfo OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioKeyCode OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioMessage OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioParms OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioPutc OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioPuts OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioRI OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioRTS OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioRead OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioReset OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioRxClear OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioRxQue OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioSetInteger OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioStatus OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioTimer OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioTxClear OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioTxQue OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioUnGetc OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioWinError simple.obj(simple) Error 42: Symbol Undefined _SelectObject 8 simple.obj(simple) Error 42: Symbol Undefined _GetStockObject 4 simple.obj(simple) Error 42: Symbol Undefined _SetMapMode 8 paint.obj(paint) Error 42: Symbol Undefined _ExtTextOutA 32 paint.obj(paint) Error 42: Symbol Undefined _SetBkMode 8 paint.obj(paint) Error 42: Symbol Undefined _CreateSolidBrush 4 paint.obj(paint) Error 42: Symbol Undefined _GetTextMetricsA 8 OPTLINK : Warning 148: USE16/USE32 Mismatch : DGROUP G:\DM\bin\..\lib\SNN.lib(winstart) Error 83: Illegal frame on start address OPTLINK : Warning 174: 32-bit Segments Inappropriate for 16-bit Segmente= d = output OPTLINK : Error 81: Cannot EXPORT : SioBaud OPTLINK : Error 81: Cannot EXPORT : SioBrkSig OPTLINK : Error 81: Cannot EXPORT : SioCTS OPTLINK : Error 81: Cannot EXPORT : SioDCD OPTLINK : Error 81: Cannot EXPORT : SioDSR OPTLINK : Error 81: Cannot EXPORT : SioDTR OPTLINK : Error 81: Cannot EXPORT : SioDebug OPTLINK : Error 81: Cannot EXPORT : SioDone OPTLINK : Error 81: Cannot EXPORT : SioEvent OPTLINK : Error 81: Cannot EXPORT : SioEventChar OPTLINK : Error 81: Cannot EXPORT : SioEventWait OPTLINK : Error 81: Cannot EXPORT : SioFlow OPTLINK : Error 81: Cannot EXPORT : SioGetReg OPTLINK : Error 81: Cannot EXPORT : SioGetc OPTLINK : Error 81: Cannot EXPORT : SioGets OPTLINK : Error 81: Cannot EXPORT : SioInfo OPTLINK : Error 81: Cannot EXPORT : SioKeyCode OPTLINK : Error 81: Cannot EXPORT : SioMessage OPTLINK : Error 81: Cannot EXPORT : SioParms OPTLINK : Error 81: Cannot EXPORT : SioPutc OPTLINK : Error 81: Cannot EXPORT : SioPuts OPTLINK : Error 81: Cannot EXPORT : SioRI OPTLINK : Error 81: Cannot EXPORT : SioRTS OPTLINK : Error 81: Cannot EXPORT : SioRead OPTLINK : Error 81: Cannot EXPORT : SioReset OPTLINK : Error 81: Cannot EXPORT : SioRxClear OPTLINK : Error 81: Cannot EXPORT : SioRxQue OPTLINK : Error 81: Cannot EXPORT : SioSetInteger OPTLINK : Error 81: Cannot EXPORT : SioStatus OPTLINK : Error 81: Cannot EXPORT : SioTimer OPTLINK : Error 81: Cannot EXPORT : SioTxClear OPTLINK : Error 81: Cannot EXPORT : SioTxQue OPTLINK : Error 81: Cannot EXPORT : SioUnGetc OPTLINK : Error 81: Cannot EXPORT : SioWinError simple.obj(simple) Error 35: Cannot Reach TARGET from FRAME at Relative 0015FH from Segment _TEXT FRAME =3D Frame of Group FLAT 0000 TARGET =3D External Symbol _AboutDlgProc 16 008BCH FIXUPP Type =3D 32-bit Offset --- errorlevel 77 # # Digital Mars makefile for SIMPLE [Win32] # # NOTE: Response file (simple.rsp) must NOT end with a carriage return, = = line feed. # # To use: "make -f simple32._d_" # CCFLAGS =3D -c -DWIN32 simple.exe: simple.res simple.obj wsc32dm.def wsc32dm.lib about.obj = line.obj paint.obj sioerror.obj # link -aa -Tpe c0w32 simple.rsp ,simple,simple, wsc32bcb.lib cw32 = import32,simple32.def,simple.res link simple.rsp,simple,simple,wsc32dm.lib,wsc32dm.def,simple.res about.obj: about.c about.h dmc $(CCFLAGS) about.c simple.obj: simple.c simple.h wsc.h dmc $(CCFLAGS) simple.c sioerror.obj: sioerror.c sioerror.h wsc.h dmc $(CCFLAGS) sioerror.c paint.obj: paint.c paint.h dmc $(CCFLAGS) paint.c line.obj: line.c line.h wsc.h dmc $(CCFLAGS) line.c simple.res: simple.rc rcc -dWIN32 -D__NT__ simple.rc
Sep 24 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
Can someone post a working .DEF file please?

I've gotten all of the other errors I was having to go
away but I get this no mater what I do for a .DEF
file:

"Error 52: .DEF Syntax Error" when I try to link.

There can be no .def file at all, or an empty .def file
(zero length) and I get the same error.

I also tried copying the tty.def file from
the sample\COMM section, still same error.


This is what I have, but it doesn't
seem to mater as no file at all gives
"Error 52".  Anyone know what "Error 52" means???

NAME        Simple
DESCRIPTION 'Simple Program'
EXETYPE     NT
CODE        PRELOAD MOVEABLE DISCARDABLE
DATA        PRELOAD MOVEABLE MULTIPLE
STACKSIZE   8192
EXPORTS
    _MainWndProc 1 =3D MainWndProc
    _AboutDlgProc 2 =3D AboutDlgProc
    _SioBaud 8 =3D SioBaud
    _SioBrkSig 8 =3D SioBrkSig
    _SioCTS 4 =3D SioCTS
    _SioDCD 4 =3D SioDCD
    _SioDSR 4 =3D SioDSR
    _SioDTR 8 =3D SioDTR
    _SioDebug 4 =3D SioDebug
    _SioDone 4 =3D SioDone
    _SioEvent 8 =3D SioEvent
    _SioEventChar 12 =3D SioEventChar
    _SioEventWait 12 =3D SioEventWait
    _SioFlow 8 =3D SioFlow
    _SioGetReg 8 =3D SioGetReg
    _SioGetc 4 =3D SioGetc
    _SioGets 12 =3D SioGets
    _SioInfo 4 =3D SioInfo
    _SioKeyCode 4 =3D SioKeyCode
    _SioMessage 16 =3D SioMessage
    _SioParms 16 =3D SioParms
    _SioPutc 8 =3D SioPutc
    _SioPuts 12 =3D SioPuts
    _SioRI 4 =3D SioRI
    _SioRTS 8 =3D SioRTS
    _SioRead 8 =3D SioRead
    _SioReset 12 =3D SioReset
    _SioRxClear 4 =3D SioRxClear
    _SioRxQue 4 =3D SioRxQue
    _SioSetInteger 12 =3D SioSetInteger
    _SioStatus 8 =3D SioStatus
    _SioTimer 0 =3D SioTimer
    _SioTxClear 4 =3D SioTxClear
    _SioTxQue 4 =3D SioTxQue
    _SioUnGetc 8 =3D SioUnGetc
    _SioWinError 8 =3D SioWinError


Linker line in Makefile:
	link  simple.rsp,simple,simple.map,wsc32dm.lib,wsc32dm.def,simple.res


On Mon, 24 Sep 2007 11:04:50 -0400, Bob Paddock  =

<graceindustries gmail.com> wrote:

 On Mon, 24 Sep 2007 09:48:55 -0400, AndyC <asmith yahoo.com> wrote:

 I posted how I used Jan Knepper's version of Implib.exe to imp-
 lement the latest GDI+ from the MSSDK over at 'c++.windows.32-
 bits'.  It will probably work for you as well.

 Get the program at http://www.digitalmars.com/~jan/

Did that. Installed in G:\DM\bin. Renamed implib.ini to implib_jk.ini and fixed the path to SPPN therein.
 Create an import lib using the program as follows:
  implib_jk /system /v /suffix /def /test /I. ***.lib
 ***.dll

Did that.
 Be sure you provide the path to all the header files.

There is only wsc.h, which is in the same directory as the wsc32.dll file, so /I. is fine.
 The resulting ***.lib can then be linked into your project.

Still doesn't work. I spent the morning starting over with my Digital Mars 8.25 CD, and going through the tedious upgrading to 8.50. I'm wondering if I broke something else because now I have more errors (below) than I had on Friday. Got the same .DEF file as Friday: EXPORTS _SioBaud 8 =3D SioBaud _SioBrkSig 8 =3D SioBrkSig _SioCTS 4 =3D SioCTS _SioDCD 4 =3D SioDCD ... To answer Walters earlier comment about doing a hex dump of the .lib file: 00000000: F0 0D 00 00 0A 00 00 05 00 00 00 00 00 00 00 00 =

 p...............
 00000010: 80 0C 00 0A 5F 53 69 6F 42 61 75 64 40 38 00 88   =

 ...._SioBaud 8..
 00000020: 22 00 00 A0 01 00 0A 5F 53 69 6F 42 61 75 64 40  "..  =

 ..._SioBaud 
 00000030: 38 09 77 73 63 33 32 2E 64 6C 6C 07 53 69 6F 42   =

 8.wsc32.dll.SioB
 00000040: 61 75 64 00 8A 02 00 00 00 00 00 00 00 00 00 00   =

 aud.............
 00000050: 80 0E 00 0C 5F 53 69 6F 42 72 6B 53 69 67 40 38   =

 ...._SioBrkSig 8
 00000060: 00 88 26 00 00 A0 01 00 0C 5F 53 69 6F 42 72 6B  ..&..  =

 ..._SioBrk
 00000070: 53 69 67 40 38 09 77 73 63 33 32 2E 64 6C 6C 09   =

 Sig 8.wsc32.dll.
 00000080: 53 69 6F 42 72 6B 53 69 67 00 8A 02 00 00 00 00   =

 SioBrkSig.......
 00000090: 80 0B 00 09 5F 53 69 6F 43 54 53 40 34 00 88 20   =

 ...._SioCTS 4..
 000000A0: 00 00 A0 01 00 09 5F 53 69 6F 43 54 53 40 34 09  ..  =

 ..._SioCTS 4.
 000000B0: 77 73 63 33 32 2E 64 6C 6C 06 53 69 6F 43 54 53   =

 wsc32.dll.SioCTS
 ...


 A files titled "***.cpp" was also created, may be useful.

#include <windows.h> int main ( int, char **, char ** ) { SioBaud ( ( int ) 0, ( unsigned ) 0 ); SioBrkSig ( ( int ) 0, ( char ) 0 ); SioCTS ( ( int ) 0 ); ... } link simple.rsp,simple,simple,wsc32dm.lib,wsc32dm.def,simple.res OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioBaud OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioBrkSig OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioCTS OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDCD OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDSR OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDTR OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDebug OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioDone OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioEvent OPTLINK : Error 180: No Match Found for Export/ENTRY - : SioEventChar=

 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioEventWait=

 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioFlow
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioGetReg
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioGetc
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioGets
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioInfo
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioKeyCode
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioMessage
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioParms
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioPutc
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioPuts
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioRI
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioRTS
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioRead
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioReset
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioRxClear
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioRxQue
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioSetIntege=

 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioStatus
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioTimer
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioTxClear
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioTxQue
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioUnGetc
 OPTLINK : Error 180: No Match Found for Export/ENTRY -  : SioWinError
 simple.obj(simple)
   Error 42: Symbol Undefined _SelectObject 8
 simple.obj(simple)
   Error 42: Symbol Undefined _GetStockObject 4
 simple.obj(simple)
   Error 42: Symbol Undefined _SetMapMode 8
 paint.obj(paint)
   Error 42: Symbol Undefined _ExtTextOutA 32
 paint.obj(paint)
   Error 42: Symbol Undefined _SetBkMode 8
 paint.obj(paint)
   Error 42: Symbol Undefined _CreateSolidBrush 4
 paint.obj(paint)
   Error 42: Symbol Undefined _GetTextMetricsA 8
 OPTLINK : Warning 148: USE16/USE32 Mismatch : DGROUP
 G:\DM\bin\..\lib\SNN.lib(winstart)
   Error 83: Illegal frame on start address
 OPTLINK : Warning 174: 32-bit Segments Inappropriate for 16-bit  =

 Segmented output
 OPTLINK : Error 81: Cannot EXPORT : SioBaud
 OPTLINK : Error 81: Cannot EXPORT : SioBrkSig
 OPTLINK : Error 81: Cannot EXPORT : SioCTS
 OPTLINK : Error 81: Cannot EXPORT : SioDCD
 OPTLINK : Error 81: Cannot EXPORT : SioDSR
 OPTLINK : Error 81: Cannot EXPORT : SioDTR
 OPTLINK : Error 81: Cannot EXPORT : SioDebug
 OPTLINK : Error 81: Cannot EXPORT : SioDone
 OPTLINK : Error 81: Cannot EXPORT : SioEvent
 OPTLINK : Error 81: Cannot EXPORT : SioEventChar
 OPTLINK : Error 81: Cannot EXPORT : SioEventWait
 OPTLINK : Error 81: Cannot EXPORT : SioFlow
 OPTLINK : Error 81: Cannot EXPORT : SioGetReg
 OPTLINK : Error 81: Cannot EXPORT : SioGetc
 OPTLINK : Error 81: Cannot EXPORT : SioGets
 OPTLINK : Error 81: Cannot EXPORT : SioInfo
 OPTLINK : Error 81: Cannot EXPORT : SioKeyCode
 OPTLINK : Error 81: Cannot EXPORT : SioMessage
 OPTLINK : Error 81: Cannot EXPORT : SioParms
 OPTLINK : Error 81: Cannot EXPORT : SioPutc
 OPTLINK : Error 81: Cannot EXPORT : SioPuts
 OPTLINK : Error 81: Cannot EXPORT : SioRI
 OPTLINK : Error 81: Cannot EXPORT : SioRTS
 OPTLINK : Error 81: Cannot EXPORT : SioRead
 OPTLINK : Error 81: Cannot EXPORT : SioReset
 OPTLINK : Error 81: Cannot EXPORT : SioRxClear
 OPTLINK : Error 81: Cannot EXPORT : SioRxQue
 OPTLINK : Error 81: Cannot EXPORT : SioSetInteger
 OPTLINK : Error 81: Cannot EXPORT : SioStatus
 OPTLINK : Error 81: Cannot EXPORT : SioTimer
 OPTLINK : Error 81: Cannot EXPORT : SioTxClear
 OPTLINK : Error 81: Cannot EXPORT : SioTxQue
 OPTLINK : Error 81: Cannot EXPORT : SioUnGetc
 OPTLINK : Error 81: Cannot EXPORT : SioWinError
 simple.obj(simple)
   Error 35: Cannot Reach TARGET from FRAME at Relative 0015FH  from
   Segment _TEXT
   FRAME  =3D Frame of Group FLAT 0000
   TARGET =3D External Symbol _AboutDlgProc 16 008BCH
   FIXUPP Type =3D 32-bit Offset

 --- errorlevel 77

 #
 # Digital Mars makefile for SIMPLE [Win32]
 #
 # NOTE: Response file (simple.rsp) must NOT end with a carriage return=

 line feed.
 #
 # To use: "make -f simple32._d_"
 #

 CCFLAGS =3D -c -DWIN32

 simple.exe: simple.res simple.obj wsc32dm.def wsc32dm.lib about.obj  =

 line.obj paint.obj sioerror.obj
 #	link -aa -Tpe c0w32  simple.rsp ,simple,simple, wsc32bcb.lib cw32  =

 import32,simple32.def,simple.res
 	link  simple.rsp,simple,simple,wsc32dm.lib,wsc32dm.def,simple.res

 about.obj: about.c about.h
     dmc $(CCFLAGS)  about.c

 simple.obj: simple.c simple.h wsc.h
     dmc $(CCFLAGS)  simple.c

 sioerror.obj: sioerror.c sioerror.h wsc.h
     dmc $(CCFLAGS)  sioerror.c

 paint.obj: paint.c paint.h
     dmc $(CCFLAGS)  paint.c

 line.obj: line.c line.h wsc.h
     dmc $(CCFLAGS)  line.c

 simple.res: simple.rc
      rcc -dWIN32 -D__NT__ simple.rc

Sep 26 2007
Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 This is what I have, but it doesn't
 seem to mater as no file at all gives
 "Error 52".  Anyone know what "Error 52" means???

All linker error messages have more or less helpful explanations at: http://www.digitalmars.com/ctg/OptlinkErrorMessages.html
Sep 27 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
On Thu, 27 Sep 2007 18:43:18 -0400, Walter Bright  
<newshound1 digitalmars.com> wrote:

 Bob Paddock wrote:
 This is what I have, but it doesn't
 seem to mater as no file at all gives
 "Error 52".  Anyone know what "Error 52" means???

All linker error messages have more or less helpful explanations at: http://www.digitalmars.com/ctg/OptlinkErrorMessages.html

I had already looked there before I posted the question. "Error 52" is in the "less helpful" class.
Sep 28 2007
↑ ↓ → Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 On Thu, 27 Sep 2007 18:43:18 -0400, Walter Bright 
 <newshound1 digitalmars.com> wrote:
 
 Bob Paddock wrote:
 This is what I have, but it doesn't
 seem to mater as no file at all gives
 "Error 52".  Anyone know what "Error 52" means???

All linker error messages have more or less helpful explanations at: http://www.digitalmars.com/ctg/OptlinkErrorMessages.html

I had already looked there before I posted the question. "Error 52" is in the "less helpful" class.

I agree.
Sep 28 2007
Walter Bright <newshound1 digitalmars.com> writes:
You have a fairly complex project with a lot of files, and not enough of 
it is in the posting to see what the problem is, though I suspect the 
simple.rsp may have an error in its syntax, causing some file other than 
the .def file from being considered the .def file.

When faced with problems of this nature, the only way to figure out what 
is going on is to:

1) make a copy of the complete project
2) simplify it by deleting half of it
3) see if that builds
4) if it does build, go to step 2
5) delete the other half, go to step 2

until you have the minimal test case. Then, the source of the problem 
often becomes glaringly apparent, as there is nothing else.
Sep 27 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
On Thu, 27 Sep 2007 18:47:18 -0400, Walter Bright  
<newshound1 digitalmars.com> wrote:

 You have a fairly complex project with a lot of files,..
 until you have the minimal test case. Then, the source of the problem  
 often becomes glaringly apparent, as there is nothing else.

Actually I gave up on building the sample at all, went a head and wrote my application, which linked and compiled just fine. No .def file ever appeared, which just confuses me more as to when the .def file is needed? How was the conference?
Sep 28 2007
↑ ↓ Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 On Thu, 27 Sep 2007 18:47:18 -0400, Walter Bright 
 <newshound1 digitalmars.com> wrote:
 
 You have a fairly complex project with a lot of files,..
 until you have the minimal test case. Then, the source of the problem 
 often becomes glaringly apparent, as there is nothing else.

Actually I gave up on building the sample at all, went a head and wrote my application, which linked and compiled just fine. No .def file ever appeared, which just confuses me more as to when the .def file is needed?

Most apps won't need a .def file. You'll need them when creating a dll, though.
 How was the conference?

The feedback we've received has been very positive.
Sep 28 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
On Fri, 28 Sep 2007 14:54:43 -0400, Walter Bright  =

<newshound1 digitalmars.com> wrote:


  Actually I gave up on building the sample at all, went
 a head and wrote my application, which linked and compiled
 just fine.


With new wsc.dll problem is back, and now its in my application instead of the sample code. :-(
 No .def file ever appeared, which just confuses
 me more as to when the .def file is needed?

Most apps won't need a .def file. You'll need them when creating a dll=

 though.

Got a new DLL of my serial port library yesterday. I did this, to make .def and .lib: implib_jk /system /v /suffix /def /test /IG:\DM\include\win32 /I. = wsc32dm.lib wsc32.dll When I link with no DEF file I get this: OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioDone 4 DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioPutc 8 DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioReset 12 DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioGetc 4 DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioInfo 4 DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioBaud 8 DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioParms 16 DMCDebug\RxFilterFrame.obj(RxFilterFrame) Error 42: Symbol Undefined _SioKeyCode 4 --- errorlevel 8 with .def file I get this: OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : SioBau= d OPTLINK : Error 182: Matches above Export/ENTRY - : _SioBaud OPTLINK : Error 182: Matches above Export/ENTRY - : _SioBaud 8 OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : SioDon= e OPTLINK : Error 182: Matches above Export/ENTRY - : _SioDone OPTLINK : Error 182: Matches above Export/ENTRY - : _SioDone 4 OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : SioGet= c OPTLINK : Error 182: Matches above Export/ENTRY - : _SioGetc OPTLINK : Error 182: Matches above Export/ENTRY - : _SioGetc 4 OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : SioInf= o OPTLINK : Error 182: Matches above Export/ENTRY - : _SioInfo OPTLINK : Error 182: Matches above Export/ENTRY - : _SioInfo 4 OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : = SioKeyCode OPTLINK : Error 182: Matches above Export/ENTRY - : _SioKeyCode OPTLINK : Error 182: Matches above Export/ENTRY - : _SioKeyCode 4 OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : SioPar= ms OPTLINK : Error 182: Matches above Export/ENTRY - : _SioParms OPTLINK : Error 182: Matches above Export/ENTRY - : _SioParms 16 OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : SioPut= c OPTLINK : Error 182: Matches above Export/ENTRY - : _SioPutc OPTLINK : Error 182: Matches above Export/ENTRY - : _SioPutc 8 OPTLINK : Error 181: Multiple Matches Found for Export/ENTRY - : SioRes= et OPTLINK : Error 182: Matches above Export/ENTRY - : _SioReset OPTLINK : Error 182: Matches above Export/ENTRY - : _SioReset 12 OPTLINK : Error 81: Cannot EXPORT : _SioBaud 8 OPTLINK : Error 81: Cannot EXPORT : _SioDone 4 OPTLINK : Error 81: Cannot EXPORT : _SioGetc 4 OPTLINK : Error 81: Cannot EXPORT : _SioInfo 4 OPTLINK : Error 81: Cannot EXPORT : _SioKeyCode 4 OPTLINK : Error 81: Cannot EXPORT : _SioParms 16 OPTLINK : Error 81: Cannot EXPORT : _SioPutc 8 OPTLINK : Error 81: Cannot EXPORT : _SioReset 12 --- errorlevel 32 How can it be both ways? wsc32dm.def: EXPORTS _SioBaud 8 =3D SioBaud _SioDone 4 =3D SioDone _SioGetc 4 =3D SioGetc _SioInfo 4 =3D SioInfo _SioKeyCode 4 =3D SioKeyCode _SioParms 16 =3D SioParms _SioPutc 8 =3D SioPutc _SioReset 12 =3D SioReset This should be all on one one, I broke it up for this message; echo /NOLOGO /SILENT /NOI /DELEXECUTABLE /EXETYPE:NT /su:windows:4.0 /DEBUG /CODEVIEW DMCDebug\RxFilterApp.obj DMCDebug\RxFilterFrame.obj, DMCDebug\RxFilter.exe,DMCDebug\RxFilter.map, "G:\wx286\lib\dmc_lib\" "G:\DM\lib\" wsc32dm.lib [lot more .lib files]= ...wsock32.lib,wsc32dm.def,DMCDebug\RxFilter.res > RxFilter.cnf link RxFilter.cnf Where am I going wrong here?
Oct 03 2007
Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 Where am I going wrong here?

Try reversing the order of the exports, i.e.: EXPORTS SioBaud = _SioBaud 8
Oct 10 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
On Wed, 10 Oct 2007 05:10:11 -0400, Walter Bright  =

<newshound1 digitalmars.com> wrote:

 Bob Paddock wrote:
 Where am I going wrong here?

Try reversing the order of the exports, i.e.: EXPORTS SioBaud =3D _SioBaud 8

That gets me: OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. OPTLINK : Error 42: Symbol Undefined _SioBaud 8 OPTLINK : Error 42: Symbol Undefined _SioDone 4 OPTLINK : Error 42: Symbol Undefined _SioGetc 4 OPTLINK : Error 42: Symbol Undefined _SioInfo 4 OPTLINK : Error 42: Symbol Undefined _SioKeyCode 4 OPTLINK : Error 42: Symbol Undefined _SioParms 16 OPTLINK : Error 42: Symbol Undefined _SioPuts 12 OPTLINK : Error 42: Symbol Undefined _SioReset 12 OPTLINK : Error 42: Symbol Undefined _SioRxQue 4 OPTLINK : Error 81: Cannot EXPORT : _SioBaud 8 OPTLINK : Error 81: Cannot EXPORT : _SioDone 4 OPTLINK : Error 81: Cannot EXPORT : _SioGetc 4 OPTLINK : Error 81: Cannot EXPORT : _SioInfo 4 OPTLINK : Error 81: Cannot EXPORT : _SioKeyCode 4 OPTLINK : Error 81: Cannot EXPORT : _SioParms 16 OPTLINK : Error 81: Cannot EXPORT : _SioPuts 12 OPTLINK : Error 81: Cannot EXPORT : _SioReset 12 OPTLINK : Error 81: Cannot EXPORT : _SioRxQue 4 --- errorlevel 18 with this .def file: EXPORTS SioBaud =3D _SioBaud 8 SioDone =3D _SioDone 4 SioGetc =3D _SioGetc 4 SioInfo =3D _SioInfo 4 SioKeyCode =3D _SioKeyCode 4 SioParms =3D _SioParms 16 SioPuts =3D _SioPuts 12 SioReset =3D _SioReset 12 SioRxQue =3D _SioRxQue 4 Is there some command line option I can use to stop the compiler from putting in these useless goofball numbers in the first place? A hexdump of wsc32.dll does not show such numbers, nor does the created wsc32.lib. A hexdump of the compiler .obj files is they only place I find them.
Oct 10 2007
↑ ↓ Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 Is there some command line option I can use to stop
 the compiler from putting in these useless goofball numbers
 in the first place?  A hexdump of wsc32.dll does not show
 such numbers, nor does the created wsc32.lib.
 A hexdump of the compiler .obj files is they only place
 I find them.

Those "goofball numbers" are the Microsoft-defined standard windows calling convention. The fact that those get stripped for DLLs is another Microsoft invention that never made sense to me. A hexdump is not a very good way to look at .obj files. Try using obj2asm or dumpobj. To look at import libraries, use lib to extract one of the modules in it, then use dumpobj or obj2asm on it.
Oct 10 2007
↑ ↓ → "Bob Paddock" <graceindustries gmail.com> writes:
On Wed, 10 Oct 2007 15:51:22 -0400, Walter Bright  
<newshound1 digitalmars.com> wrote:

 A hexdump is not a very good way to look at .obj files. Try using  
 obj2asm or dumpobj. To look at import libraries, use lib to extract one  
 of the modules in it, then use dumpobj or obj2asm on it.

I created wsc32.lib using implib(_jk) from the wsc32.dll I was supplied. Doing lib -x wsc32.lib SioBaud crated a 44 byte file. Doing 'dumpobj SioBaud.obj' told me what I already knew, the function is called "SioBaud". Not _SioBaud, not _SioBaud 8, just plain old "SioBaud".
Oct 10 2007
Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 Where am I going wrong here?

It can really help to cut your project down. I suggest cutting it down to one export, one library being linked in, etc.
Oct 10 2007
↑ ↓ "Bob Paddock" <graceindustries gmail.com> writes:
On Wed, 10 Oct 2007 15:52:58 -0400, Walter Bright  
<newshound1 digitalmars.com> wrote:

 Bob Paddock wrote:
 Where am I going wrong here?

It can really help to cut your project down. I suggest cutting it down to one export, one library being linked in, etc.

All I'm doing is replacing wsc32.dll/wsc32.lib version 4.2 with wsc32.dll/wsc32.lib version 4.3. I'm changing nothing in the working project. With wsc32_42 I did not need any .def file, everything Just Worked. I've tried creating the wsc32.lib file with both implib and implib_jk with the same results from wsc32.dll 43. With wsc32_43 no combination of magic words in the .def file will get the project to link. It either tells me _SioBaud 8 is undefined, or "Error 81: Can Not Export _SioBaud ", or both. What is "Error 81" truly telling me?
Oct 10 2007
↑ ↓ → Walter Bright <newshound1 digitalmars.com> writes:
Bob Paddock wrote:
 On Wed, 10 Oct 2007 15:52:58 -0400, Walter Bright 
 <newshound1 digitalmars.com> wrote:
 
 Bob Paddock wrote:
 Where am I going wrong here?

It can really help to cut your project down. I suggest cutting it down to one export, one library being linked in, etc.

All I'm doing is replacing wsc32.dll/wsc32.lib version 4.2 with wsc32.dll/wsc32.lib version 4.3. I'm changing nothing in the working project. With wsc32_42 I did not need any .def file, everything Just Worked.

Then I suggest running lib over wsc32.lib and wsc32_42.lib to create wcs32.lst and wsc32_42.lst. Then, use lib to extract the .obj file from each that has SioBaud in it. Then, obj2asm or dumpobj each of those .obj files to see what is different.
Oct 11 2007