Question

Adding a New Library to Turbo C 2.01 on freedos

Asked by: zero303

Im using Freedos beta8, Borland Turbo C 2.01 and I wish to use DSock. I am very new to c btw...


I have included DSock.h but i get...

"Undefined Symbol '_DSock_Open' in module server.c"

I have been told i need to add this library... how do i do this???


Thanks in advance,


Gary

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-08-11 at 08:44:08ID20706100
Tags

c

,

turbo

Topic

C Programming Language

Participating Experts
3
Points
50
Comments
12

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Linking Turbo C modules with TASM modules
    Can someone please give me a complete description on how you link Turbo C modules with TASM modules? I keep getting "Undefined symbol" messages in Turbo C (I'm trying to link a TASM module into my Turbo C program).
  2. GIF and WAV in Turbo C++
    How do I display a GIF File using Turbo C++, and How do I Play a WAV file using Turbo C++???
  3. Converting Borland Turbo Pascal to C ?
    I'm interested in seeing if there is a utility (either shareware or commercial) that performs conversion of Borland Turbo Pascal to C. The pascal program was written in the mid eighties. Any input is greatly appreciated. Thanks
  4. Borland Turbo Assembler?
    Hi... I didn't see a category for Turbo Assembler, so I'm hoping that maybe someone in the C++ group will happen to know something about it! :) Simple question: Can a Borland Turbo Assembler application handle long filenames a la Windows 95? If so, can you give an expla...
  5. Turbo C++ Graphic
    I am using Borland C++ 5.02. Can anybody tell me that how to display my initgraph program, since I already specify my bgi folder is in C:\\BC\\BGI and a project is created. ***sorry that i wrongly type the title in "turbo".

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: rstaveleyPosted on 2003-08-11 at 09:00:55ID: 9123190

 

by: _Rob_Posted on 2003-08-11 at 09:06:25ID: 9123237

Oh, Turbo C. Long time no see (about ten years) ;-)

Add the DSock.lib file to the project. If I remember correctly, there is a window pane in the Turbo C environment with the files that the project is made up with. I think you can press the Insert key on the keyboard to add files there.

Read more about it here: http://www.dmp.com.tw/tech/dsock/guide.htm

"The fast way to use DSock is to open start-up project of DSock example - 'DSock\Demo\DSock_AP.' "

/rob


 

by: _Rob_Posted on 2003-08-11 at 09:06:48ID: 9123238

You beat me to it ;-)

 

by: KdoPosted on 2003-08-11 at 11:34:47ID: 9124337


Through the menu options, peruse to:

Environment / Linker / Libraries


at the end of the string that identifies the libraries, add ";<libraryname>

I don't recall the exact name, it's probably "sockets.o", "sockets.lib", "dsock.lib", or something similar.

Kent

 

by: zero303Posted on 2003-08-12 at 03:17:03ID: 9128795

I have opened the start up project using "tc dsock_ap.prj" (is that right) and i am presented with a file saying Turbo C project file. I basically have no idea what do with this as the options under project menu are Project name (blank??), Break make, Auto Dependencies, clear project and remove messages.

However in the complie menu (while the project is still open) I added DSock_AP.C as the primary c file which then allowed me to complie dsock_ap.c while only having the project open... I thought that would have been it...

Pressing the insert key only resulted in it changing the cursor style like it does in word processors such as word.

I am also worried by the fact that my menu stuctures are different to those described in Kdo's post...

In options i have Linker and Environment as seperate sections and neither contain a libraries options...

I have...

Options
>Compiler
>>Model
>>Defines
>>Code Generation
>>Optimization
>>Source
>>Errors
>>Names

>Linker
>>Map File
>>Initialize Segments
>>Default Libraries (On/Off, cant add here)
>>Graphics Library (On/Off)
>>Warn Duplicate Symbols
>>Stack Warning
>>Case Sensitive link

The environment menu just offers options relating to screen size and options such as auto save...

Is there not a config file i can add the library to? Libraries were easy to add in visual c.... grrr

I guess i'd better up the points a bit...

Please dont give up on me guys!!!


Gary
 

 

by: rstaveleyPosted on 2003-08-12 at 04:50:51ID: 9129157

If you are not likely to use the IDE (Integrated Development Environment) for any projoects subsequent to this one, you probably don't want to clutter your brain cells with knowledge about the IDE. The IDE is a very fine tool for developing code, but for a one off project never to return to Turbo C, I'd recommend using the command line.

Here's how your command line might look if your project consisted of two source files:

   tcc -ml -IC:\TC\INCLUDE -LC:\TC\LIB yourprog.cpp yourextr.cpp c:\DSOCK\LIB\DSOCK.LIB

Massage the paths to suit your system.

DSOCK.LIB is a large memory model library. You therefore need to specify the command line option -ml to compile your source with far pointers for code and data and to ensure that the linker pulls in the appropriate start-up code (c0l.obj) and system libraries (*l.lib).

I'm assuming you installed Turbo c++ in c:\tc and the executables tcc.exe and tlink.exe are on the path (c:\tc\bin\. if I remember rightly?). I am assuming that dsock.lib is in c:\DSOCK\LIB\.

 

by: zero303Posted on 2003-08-12 at 05:43:13ID: 9129469

Ill accept that... created a new prob which is going to bother me but i think ill start a new post for that...

The prob btw is no packet driver found which is odd because i have Microsoft Network Client 3.0 set up and that installed the packet drivers and i have been pinging all the machines in the room.... oh well, DSOCK came with some packet drivers so ill see if i can kill all the hardwork i did with the networking side of it all by installing them!!!


Thanks again everyone...


Gary

 

by: KdoPosted on 2003-08-12 at 05:51:40ID: 9129519

Hi zero303,

It has been a long time...  I've forgotten exactly where the "files" menu is and I'm working from memory here.  :(   I can get to my Turbo C system about noon today (3+ hours from now).  I'll look up the location and post it.

The project file allows you to "combine" several source files into a "project" and have them all compiled and linked together.  In functionality, it is pretty close to a unix *make* file.

For now, go back to the "Project" tab and select "Clear Project".  Otherwise you're likely to see even more bizarre behavior.


By the way, if your source file gets to be too big for the IDE (or you have other source modules that you want to include) you can create a simple project by:

1)  Under the "Project" tab enter a name for your project such as "MYSTUFF".
2)  Edit the file "MYSTUFF.PRJ" and list all of the files that you want to include.  "MYPROG", "MYSUBR", "YOURSUBR", etc. each on a separate line.
3)  Save "MYSTUFF.PRJ"

Now the IDE will make sure that MYPROG.C, MYSUBR.C and YOURSUBR.C are compiled whenever they are changed and all linked together into your executable.  Note that the IDE won't recompile these modules just because a header file is changed!  If you change a header file, delete all of the object files in your directory (*.o) and let the IDE rebuild all of the modules.

Kent

 

by: zero303Posted on 2003-08-12 at 05:57:04ID: 9129571

Sorted....  :)


Gary

 

by: KdoPosted on 2003-08-12 at 10:47:24ID: 9132018

Hi zero303,

I got to the Turbo C environment at lunch.

If you'll go to "Options" / "Directories" you'll see an entry for "libraries".  Append ";c:\DSOCK\LIB\DSOCK.LIB" to whatever is already in the line and the IDE should be able to build your program.

I'm making the same assumption as did rstaveley about the location of DSOCK.LIB.

Kent

 

by: zero303Posted on 2003-08-13 at 01:00:07ID: 9136884

I tried that, I have Options>Directories>Library Directories... In there is the path to the main library directory: C:\tc\lib. I added to it so that it was C:\tc\lib;C:\tc\lib\dsock.lib (thats where i have put the lib) and it didnt work...

What i have done is use rstaveley's method with success but i've just written a server.bat to save me typing in that command...


Thanks again guys... Usually my ancient questions dont get this big a response... Im sure ill have plenty more!!! ;)


Gary

 

by: KdoPosted on 2003-08-13 at 05:12:14ID: 9137956


Now I am curious.....  That should have worked just fine.

Are you getting a link error or compile error?

You'll probably also need to append ";C:\somedir"  to Options>Directories>Includes so that the compiler picks up the right "include" file.

Kent

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...