Solved

New to C

Posted on 1997-02-24
3
231 Views
Last Modified: 2012-08-14
I'm new to C and am learning it through an extension course at Cal Berkeley. The text we are using is "The Art and Science of C" by Eric Roberts.

The text requires us to use some additional user-included libraries, but doesn't tell us how to set them up. Obviously, that depends on your compiler and the environment you are working in. He provides the header and source files and says to do the following.

1. Put the header files in the include directory of your compiler. (This was easy).

2. Compile the source files to produce the appropriate object files. (This I can do as well).

3. Put the object files into a library file. (This I don't know how to do.

I'm using Microsoft's Visual C++ v4.1 for this class. I've tried to do this many different ways, but have yet to figure it out. Every time I use the following include statement:

#include "genlib.h"

I get a linking error.

What am I doing wrong? Please help!!!

Thanks!!

Jon Wynacht
jonw@accountmate.com
0
Comment
Question by:wynacht
3 Comments
 
LVL 2

Expert Comment

by:Slarti
ID: 1249431
The headers are probably intended for a textmode OS like Unix or DOS. VC++ is by default a Windows compiler. There should be some way to tell VC to simulate a DOS window (actually makes a Windows programs that uses ordinary ANSI C I/O libraries). In Borland C++ this is called EasyWin. I believe in VC it's called QuickWin or something, I'm not sure. Anyone?

0
 
LVL 1

Accepted Solution

by:
vanbasco earned 50 total points
ID: 1249432
Yes this thing you need is Quickwin. It comes with VC ++.

vanbasco
0
 

Expert Comment

by:Garry031097
ID: 1249433
genlib.h most likely references some functions in the object files you didn't know how to make into libraries.  I'm not familier with VC++, but I'm sure there's a command to combine .OBJ files into one .LIB file.  You may try looking at VC's help.  One thing about Windows is you don't need to look through command line options to find out how to do something, you just need to click on Help ;)
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Describe order of operation while copying text 11 114
Which checksum is this? 7 139
Passing a array as parameter - C 2 84
Using ANSI C how to Read a .csv file 10 69
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now