Link to home
Start Free TrialLog in
Avatar of kishj
kishj

asked on

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

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
Avatar of Zoppo
Zoppo
Flag of Germany image

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
Avatar of AlexVirochovsky
AlexVirochovsky

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.
Avatar of kishj

ASKER

Adjusted points from 100 to 130
Avatar of kishj

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of AlexVirochovsky
AlexVirochovsky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kishj

ASKER

The end solution was not so easy as you proposed, but close. Thanks for your time.