Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

conversion of ms vc++ 5.0 project to build a dll via wizard to borland -

Posted on 2000-05-03
6
Medium Priority
?
191 Views
Last Modified: 2010-04-02
Hello.

I have a .dsp (a file that represents an microsoft project) which is used to build a dll to interface with a product I need to interface with. The product vendor supplies the code for a "bare" dll, and you can put your own goodies in it at different interface points - i.e. function1 might be called at startup, function2 when the user does a common action in the product, etc.

I tried using the wizard to convert ms projects to borland, but I get at link time the error:

[LINKER ERROR] Unable to open file 'OLDNAMES.LIB'

I don't see this file in the project manager anywhere... can anyone explain why it is there, how I can remove it, and why I should or should not remove it?

Thanks Much!

Jeff Kish
0
Comment
Question by:kishj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 2773834
Hi kishj,

I found following in MSDN about oldnames.lib:

----------------------------------------------------------------------------------------------------------------------
Backward Compatibility
The compiler views a structure that has both an old name and a new name as two different types. You cannot copy from an old structure type to a new structure type. Old prototypes that take struct pointers use the old struct names in the prototype.

For compatibility with Microsoft C professional development system version 6.0 and earlier Microsoft C versions, the library OLDNAMES.LIB maps old names to new names. For instance, open maps to _open. You must explicitly link with OLDNAMES.LIB only when you compile with the following combinations of command-line options:

/Zl (omit default library name from object file) and /Ze (the default — use Microsoft extensions)

/link (linker-control), /NOD (no default-library search), and /Ze
For more information about compiler command-line options, see Compiler Reference in the Visual C++ Programmer’s Guide.
----------------------------------------------------------------------------------------------------------------------

It seems that VC++ uses this OLDNAMES.LIB as a default library.
I don't know if it would be helpful sending you this lib. If you want to try it, post your email here (but I'll have to go in about half an hour, so I don't know if I can do it today).

I don't know anything about borland's libs but perhaps there's a lib for this purpose too...

hope that helps,

ZOPPO
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2774383
1. I think, best way: forget about dsp file and make you own IDE : it is very simple.
2. If i understand right, you want use
some DLL, maked by VS, in BC. It is not very easy:
  2.1. You can use LoadLibrary
  2.2  If you want use lib files:
      With help of  impdef.exe make DEF
      file and change it by BC rules.
      With help of implib.exe and def
file make lib file and insert in in you
      project.
0
 

Author Comment

by:kishj
ID: 2774746
Adjusted points from 100 to 130
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:kishj
ID: 2774747
Not quite sure I stated my issue correctly. Thanks for responding. Here it is again.

A Customer of ours buys cmms system from company. Lets call the product MAX.
When the customer runs MAX, it uses MAX.DLL.
Functions in MAX.DLL are called when MAX starts up, terminates, and also whenever it realizes the user is doing something significant in the application. These functions in the MAX.DLL are called entry points.

The cmms company includes source code and a .dsp file for MAX.DLL which does nothing right now. This means that anyone can rebuild MAX.DLL and stick goodies in it.

To integrate my application with the customers MAX product they purchased, I need to put goodies in the MAX.DLL - however I use Borland tools.

I am having difficulty figuring out how to write the dll using Borland such that the dll will look the same as far as the interface goes (the functions that make up the entry points) - you know .. what I need to do to headers and def files, etc. to make the borland output dll ok to use.

I am looking for a simple example possibly.

Either this or I can try to compile the dll using VC 5.0 and build new functions in a borland dll and try to call the new functions from the vc 50 built dll. (yeah I have vc 5.0, but I really don't want to rely on it).

A function in the VC 5.0 code might look like this:

BOOL WINAPI LibInit( BOOL  bFirstInit,
                       LPCSTR Information,,
                       LPCSTR MoreInformation)

Hope this is clearer - thanks for reading.

Jeff
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 260 total points
ID: 2777422
Make dll in BC very simple: you
chouse "dll" type in TargetExpert,
inlude you text, it is all!
After link BC creates lib file, too,
that you can use for call functions
from dll.
Examples you can find in BC5\examples\wondows\dlldemo directory, or
i can send you(write you EMail).
0
 

Author Comment

by:kishj
ID: 2778364
The end solution was not so easy as you proposed, but close. Thanks for your time.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

715 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