Solved

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

Posted on 2000-05-03
6
175 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 130 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

911 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

19 Experts available now in Live!

Get 1:1 Help Now