473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Static library and Dynamic library

3
Hi

I have static library that is created from VC++.Net, however, I would like to use it in Borland C++ and I do any ways but it is not successful. So I want to ask: by the way can I use static library in Borland C++? Or can I change the static library into dynamic library? If the second way can be, can you tell me the ways?

If any ways above cannot do, please show me another way. Thanks alot.

Any instructions and any ideas are very great! I hope I will get the feedback as soon as posible!
Oct 5 '07 #1
4 3686
weaknessforcats
9,208 Expert Mod 8TB
You cannot use a library created by VC++ in a Borland project.

Or, more generally, you cannpot use a library compiled with a different compiler from the one you are using.

The reason is the name mangling required by C++ to resolve function overloads into unique function names for the compiler and linker. The C++ standard requires mangling occur but the algorithm for the mangling is left to the mental fantasies of the compiler writer.

You just have to compile the dll using the Borland compiler and all will be well.

If that'snot possible, then you can't use Borland.
Oct 5 '07 #2
kukuta
3
Thank you for your advice!

Since I am using ipl98 library version 2.20 that it cannot compile in Borland C++. So I must compile it in VC++.Net. But you tell me that if I compile in VC++.net, i cannot use that dll outside .Net enviroment.

However, I want to use ipl98 library version 2.20 in Borland C++ that I cannot compile it in Borland C++, can you give me other advices? Have you been used ipl98 library yet? If you have the experience that please help me! Thank you very much!

I will wait your advices or instructions!

Best regards
kukuta
Oct 8 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
Since I am using ipl98 library version 2.20 that it cannot compile in Borland C++. So I must compile it in VC++.Net. But you tell me that if I compile in VC++.net, i cannot use that dll outside .Net enviroment.
Almost. What I said was a static library compiled by Visual Studio is generally not useable by another compiler, like Borland, due to name mangling.

Your orignal post referred to a static library.

DLLs are a little different. They are a relic from the C age of 1972 before C++ was invented. That means the function names in a dll must be unique. Like in C. So if the dll were compiled by Visual Studio, then it should be useable in Borland as long as its the same operating system.

However, do not expect a dll compiled using Windows to run on a Linux box.
Oct 8 '07 #4
kukuta
3
Hi weaknessforcats,

Thanks for your advices.

I means that if the dll or lib, which one I can use it in the Borland C++ is great. Since the ipl98 library version 2.20 cannot be compile in the Borland C++ successful(compiling successful but the dll and lib creating cannot run with example, it means unsuccessful compiling), so I must be compile ipl98 in the VC++.net to create dynamic library and static library. However, the dynamic library(dll) cannot run with the example of ipl98 library, just only static library(lib) can run with.

That is the reason I want to use static library in VC++.net to transition to dynamic library and after that using it in the Borland C++.

There are all what I want to ask you. Or you have another way to solve it. Please help me and give me emergency exit

How about is transition static library into dynamic library? This ways can we be successful?

Since I have no experience about dll and lib so I hope that you will show me step by step!

Thanks so much!

Best regards
Oct 9 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: iceColdFire | last post by:
Hi, Can someone highlight the difference between static library and bynamic library...and how do .lib and .dll files come up in the picture... Thanks, a.a.cpp++ :-)
1
by: Eduardo Suárez | last post by:
Hi, i have tried to understand how static variables work on a dynamic library, but there's a point i can't see. * Is the data segment (where static variables live, please confirm) copied for...
6
by: Andrew S. Giles | last post by:
Is it possible to bring in a static library (developed in C++) into a C# project/solution? Thanks in advance for any information. Andrew S. GIles
5
by: meendar | last post by:
can anyone tell me what the static and dynamic library? thnkx in advance.
5
by: info | last post by:
Hi! Please be patient with a newbie... I use DevC++. I've found and compiled succefully various openGL examples. Before build the application, I link the project with static libs, like, in...
14
by: Shimon Sim | last post by:
I have a static variable defined something like this private static Dictionary<string, string> roles = new Dictionary<string,string>(); Can I safely assume that it will be live for the live of...
20
by: JohnQ | last post by:
The way I understand the startup of a C++ program is: A.) The stuff that happens before the entry point. B.) The stuff that happens between the entry point and the calling of main(). C.)...
4
by: sealo | last post by:
Hello, I have a test in VS2005 that static library A.lib use the dynamic library C.dll. Then a application App use the A.lib. App-->A.lib-->C.dll It works. But if I remove the C.dll, the app...
6
by: Even | last post by:
Hi all, As far as I know, relative address will be assigned by program at link time.Right? Ok, here we go. So if we use a static library, it will give the program an relative address(i mean...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.