[comp.windows.ms.programmer] my first windows program

siva@bally.Bally.COM (Siva Chelliah/50000) (05/17/91)

I have the SDK for Windows 3.0.  I copied a sample program (snap3.c) from a
magazine and tried to get it working.  I got numerous link errors (unresolved
externals )
Among them are :

    CREATEWINDOW in file(s)
        snap3.obj (snap3.c)

    FATALAPPEXIT in file(s)
      c:\appl\windev\lib\SLIBCEW.LIB (windows\fatal.asm)

    OUTPUTDEBUGSTRING in file(s)
      c:\appl\windev\lib\SLIBCEW.LIB (dos\nmsghdr.asm)

I am going crazy.    I used the following link command in a make file
 
       link /NOD snap3,,,libw slibcew,snap3.def

 1) using lib I found out that CreateWindow is there in the library libw.
 2) I do not understand how you can give an ASCII file (sanp3.def) to the
    linker.
 3) Do I have to do something after installing the SDK  (compile something ?)?
 


Please help.  I am trying to run my first windows program.

Thanks
Siva        
-- 
/=*=*=*=*=*=*=*=*=*=*=*=*=*=*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\
| Siva@bally.bally.com     | He who asks is a fool for five minuites,|
| Bally Systems,           | but he who does not ask remains a fool  |
| Reno,  NV 89502          | forever      -Old Chinese saying        |

press@venice.SEDD.TRW.COM (Barry Press) (05/17/91)

In article <498@bally.Bally.COM> siva@bally.Bally.COM (Siva Chelliah/50000) writes:
>
>       link /NOD snap3,,,libw slibcew,snap3.def
>

Try linking in libw (i.e., libw.lib) AFTER slibcew.  The reason is that
the linker only makes one pass to satisfy externals, and since it hasn't seen
the requirements from slibcew when it processes libw, it doesn't worry about
those other entries.

-- 
Barry Press                                 Internet: press@venice.sedd.trw.com

cadsi@ccad.uiowa.edu (CADSI) (05/17/91)

From article <498@bally.Bally.COM>, by siva@bally.Bally.COM (Siva Chelliah/50000):
> 
> I have the SDK for Windows 3.0.  I copied a sample program (snap3.c) from a
> magazine and tried to get it working.  I got numerous link errors (unresolved
> externals )
> Among them are :
> 
>     CREATEWINDOW in file(s)
>         snap3.obj (snap3.c)
> 
>     FATALAPPEXIT in file(s)
>       c:\appl\windev\lib\SLIBCEW.LIB (windows\fatal.asm)
> 
>     OUTPUTDEBUGSTRING in file(s)
>       c:\appl\windev\lib\SLIBCEW.LIB (dos\nmsghdr.asm)
> 
> I am going crazy.    I used the following link command in a make file
>  
>        link /NOD snap3,,,libw slibcew,snap3.def
> 
>  1) using lib I found out that CreateWindow is there in the library libw.
>  2) I do not understand how you can give an ASCII file (sanp3.def) to the
>     linker.
>  3) Do I have to do something after installing the SDK  (compile something ?)?

You need to take the correct linker off your MSC diskettes.  When MSC installs
itself, it does not install the segmented linker (at least this was the
case at MSC 5.1 and I quit MSC at that rev.).  I think the linker was on
disk 6 at that rev, but I can't totally remember.  ANyway, I think if
you peruse your disks, you'll find another disk.  If this is still the
case with MSC, this maybe ought to go into the FAQ.

|----------------------------------------------------------------------------|
|Tom Hite					|  The views expressed by me |
|Manager, Product development			|  are mine, not necessarily |
|CADSI (Computer Aided Design Software Inc.	|  the views of CADSI.       |
|----------------------------------------------------------------------------|

Eric_Lapaille@p2721.f27.n295.z2.fidonet.org (Eric Lapaille) (05/23/91)

 > > I am going crazy.    I used the following 
 > > link command in a make file
 > >
 > >        link /NOD snap3,,,libw slibcew,snap3.def
 > >
 > You need to take the correct linker off your MSC 
 > diskettes.  When MSC installs
 > itself, it does not install the segmented 
 > linker (at least this was the
 > case at MSC 5.1 and I quit MSC at that rev.).  
 > I think the linker was on
 > disk 6 at that rev, but I can't totally 
 > remember.  ANyway, I think if
 > you peruse your disks, you'll find another 
 > disk.  If this is still the
 > case with MSC, this maybe ought to go into the FAQ.


 The problem is probably the following : MSC installs correctly the linker
in , let's say ' C:\MSC6\BIN but you have another f..g old link in C:\DOS
which is not segmented linker and your path is C:\DOS;C:\MSC6\BIN.
 The next time you install a MSC compiler , read more carefully the last
installation screen !