• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

creating dll

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to create dll using Turbo C++ 3.0?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing to do with Java, so moved to General Computing.
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure that turbo c++ 3.0 supports a generating a DLL, as it was built for work with DOS executables, and DLL's as we know them today didn't exist back then. At least that is what I am seeing with the tlink v5.0 with my turbo c++ 3.0.

A dynamic link library, is a shared library that is loaded at run time by the operating system, when an executable program being loaded would depend on features in that library. Once it is loaded, it can then be shared between other applications that are also running.
DLL is a binary file format, that relies on the compiler and linker tools to build code that is relocatable, and depends on the features of the operating system to know how to load and use a DLL as they are needed.

Turbo C++ does support making a library though, with tlib. This is where I can compile sources for common utilities and place the built results into a .lib file, which can later be used and reused to (statically) link with other source files as I build them.
Would that be what you were wanting to do?

If a DLL is really what is wanted, it can be built using the usual compile form c(pp) sources into .obj files, and then specifying options to tlink to make it into a dll. Though your header files would need to say that your code exists, but not here, for example, specify that the function is in an external location, and uses the C calling convention:
extern "C" void f(int);

Then with tlink v7.0 (comes with borland c++ 4.5, or tasm 4.1) supports the /Td switch, which means build a .dll file instead of a .exe output.

Though I have never tried it, I guess you could try to use the newer tlink with the tc 3.0, as long as you don't use the tiny memory model, since the relocation for .com files will not work with .dll files.
But I still think the output .dll file would not work in DOS.?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic