🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.programmer.tools.owl
5 messages
5 total messages Started by Jerry Leong Wed, 06 Mar 1996 07:22
How do I link a library to my program??
#41
Author: Jerry Leong
Date: Wed, 06 Mar 1996 07:22
10 lines
880 bytes
Hi,
     I just started to learn progarmming in windows and I ran into a
problem immediately.
    I have been given a library file (winsock.lib) which contains
routines that I need to use in my program. But even if I include it
in my project file, linker still couldn't find the routines in the
lib. Somehow I am under the impression that I need to call certain
functions in my progam in order to load the library into the module.

  Please help. Your response is greatly appreciated!
Re: How do I link a library to my program??
#42
Author: Bob White
Date: Wed, 06 Mar 1996 17:50
16 lines
1287 bytes
Add the library name such as "xyz.lib" to the project list.  Also, make sure 
that the link search path (directory) points to where the library is located.
Hope that helps.

In article <313d3c58.4431866@news.csus.edu>, wleong@sfsu.edu says...
>
>Hi,
>     I just started to learn progarmming in windows and I ran into a
>problem immediately.
>    I have been given a library file (winsock.lib) which contains
>routines that I need to use in my program. But even if I include it
>in my project file, linker still couldn't find the routines in the
>lib. Somehow I am under the impression that I need to call certain
>functions in my progam in order to load the library into the module.
>
>  Please help. Your response is greatly appreciated!
Re: How do I link a library to my program??
#44
Author: Kiran Muglurmath
Date: Thu, 07 Mar 1996 06:15
15 lines
1261 bytes
> In article <313d3c58.4431866@news.csus.edu>, wleong@sfsu.edu says...
> >
> >    I have been given a library file (winsock.lib) which contains
> >routines that I need to use in my program. But even if I include it
> >in my project file, linker still couldn't find the routines in the
> >lib. Somehow I am under the impression that I need to call certain
> >functions in my progam in order to load the library into the module.

If the library in question is an import library for a DLL, then you must
also set the link flag to Dynamic linking in TargetExpert. If it is set
to Static linking, you will see the same symptoms you described.


Good luck.
-Kiran.
Re: How do I link a library to my program??
#43
Author: Kurt Watzka
Date: Thu, 07 Mar 1996 11:48
28 lines
1769 bytes
Kiran Muglurmath <kiranm@fnx.com.au> writes:

>> In article <313d3c58.4431866@news.csus.edu>, wleong@sfsu.edu says...
>> >
>> >    I have been given a library file (winsock.lib) which contains
>> >routines that I need to use in my program. But even if I include it
>> >in my project file, linker still couldn't find the routines in the
>> >lib. Somehow I am under the impression that I need to call certain
>> >functions in my progam in order to load the library into the module.

>If the library in question is an import library for a DLL, then you must
>also set the link flag to Dynamic linking in TargetExpert. If it is set
>to Static linking, you will see the same symptoms you described.

Neither our Watcom 10.5 nor the brand new Visual C++ 4.0 compilers
have a TargetExpert. Have I missed a significant extension to the
definition of the C programming language, or is this answer limited
to a special implementation that the original poster may or may not
have?

If you post "solutions" that are limited to _one_ implementation 
of a language, at least say so in your "answer".

Kurt
--
| Kurt Watzka                             Phone : +49-89-2180-6254
| watzka@stat.uni-muenchen.de
| ua302aa@sunmail.lrz-muenchen.de
Re: How do I link a library to my program??
#45
Author: Kiran Muglurmath
Date: Mon, 11 Mar 1996 05:53
31 lines
2040 bytes
Kurt Watzka wrote:
> 
> Kiran Muglurmath <kiranm@fnx.com.au> writes:
> 
> >> In article <313d3c58.4431866@news.csus.edu>, wleong@sfsu.edu says...
> >> >
> >> >    I have been given a library file (winsock.lib) which contains
> >> >routines that I need to use in my program. But even if I include it
 
If the library in question is an import library for a DLL, then you must
also set the link flag to Dynamic linking in TargetExpert. If it is set
to Static linking, you will see the same symptoms you described.
 
> Neither our Watcom 10.5 nor the brand new Visual C++ 4.0 compilers
> have a TargetExpert. Have I missed a significant extension to the
> definition of the C programming language, or is this answer limited
> to a special implementation that the original poster may or may not
> have?
> 
> If you post "solutions" that are limited to _one_ implementation
> of a language, at least say so in your "answer".

The above posting appeared in comp.os.ms-windows.programmer.tools.owl
newsgroup, which deals with issues related to the ObjectWindows
framework offered with Borland C/C++ compilers. The above solution
applies to that compiler.

If you need solutions to Watcom or Visual C++ compiler related problems,
then surely the owl newsgroup is the wrong one to post it to. 

Kiran Muglurmath.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads