October 10, 2007
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 = _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  = _SioBaud@8
   SioDone = _SioDone@4
   SioGetc = _SioGetc@4
   SioInfo = _SioInfo@4
   SioKeyCode = _SioKeyCode@4
   SioParms = _SioParms@16
   SioPuts = _SioPuts@12
   SioReset = _SioReset@12
   SioRxQue = _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.



October 10, 2007
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.
October 10, 2007
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.
October 10, 2007
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".
October 10, 2007
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?





October 11, 2007
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.
October 22, 2007
I looked at the header files (wsc.h) and this MC declspec garbage. Maybe that is causing problems when you make the import lib?  Just force it all FAR PASCAL. =====================================================

#ifdef STATIC_LIBRARY
  #define DLL_IMPORT_EXPORT
#else
  #ifdef WIN32
    #ifdef DLL_SOURCE_CODE
       #define DLL_IMPORT_EXPORT __declspec(dllexport) __stdcall
    #else
       #define DLL_IMPORT_EXPORT __declspec(dllimport) __stdcall
    #endif
  #else
    #define DLL_IMPORT_EXPORT FAR PASCAL
  #endif
#endif
November 13, 2007
On Thu, 11 Oct 2007 04:42:47 -0400, Walter Bright <newshound1@digitalmars.com> wrote:

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


I've really *REALLY* learned to hate this crap.  I was happily
compiling with my version 4.2 DLL, everything was going fine.

Then I added add a new .cpp file to the makefile, related in no way at all to
the serial port DLL stuff, and now 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 _SioPuts@12
DMCDebug\RxFilterFrame.obj(RxFilterFrame)
 Error 42: Symbol Undefined _SioDone@4
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 _SioRxQue@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 9
Done.

9 errors, 0 warnings

Why did a adding a totally unrelated file break this
stuff again?

I'd like to simply work on my project, not continually
fight the tools...

1 2 3 4
Next ›   Last »