Solved

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

Posted on 2000-05-03
6
179 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mixing C++ & C# in Vis Studio 2013 7 202
c++ syntax question 9 52
White board coding practice 3 91
One named event, multiple event handlers 2 24
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

828 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