473,394 Members | 1,709 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,394 software developers and data experts.

static dll linking

I've got a problem - I must to static link to dll library, which is
placed in subdirectory of application.
I knonw how do it in delphi but I don't known how do it in c++
(builder).

In delphi I do:
procedure FunctionName; stdcall; external 'subdirectory\library.dll';

In c++ static linking is making by lib files and there's no path and
file name of dll defined:
void __declspec(dllimport) __stdcall FunctionName();

I dont want to set paths in system and linking dynamic by LoadModule
etc.

Can you help me?

Jul 13 '07 #1
2 2713
On 2007-07-13 08:42, amarok wrote:
I've got a problem - I must to static link to dll library, which is
placed in subdirectory of application.
I knonw how do it in delphi but I don't known how do it in c++
(builder).

In delphi I do:
procedure FunctionName; stdcall; external 'subdirectory\library.dll';

In c++ static linking is making by lib files and there's no path and
file name of dll defined:
void __declspec(dllimport) __stdcall FunctionName();

I dont want to set paths in system and linking dynamic by LoadModule
etc.
The path is usually passed to the linker. You should try a groups
dedicated to Visual Studio (or search MSDN) for more help.

--
Erik Wikström
Jul 13 '07 #2

"Erik Wikström" <Er***********@telia.comwrote in message
news:4_****************@newsb.telia.net...
The path is usually passed to the linker. You should try a groups
dedicated to Visual Studio (or search MSDN) for more help.
Actually, he should go to the Borland newsgroups
(borland.public.cppbuilder.nativeapi would be a good choice) as his question
is about C++Builder (a Borland product).

- Dennis
Jul 14 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dibyendu Roy | last post by:
Hi All, I build an object called "dblorcle" to connect to oracle database in Sun solaris box. This is built linking with various oracle ".a" (archived, for static linking) files come with standard...
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
8
by: Robert A Riedel | last post by:
I have an application that requires a DLL and an executable that uses the DLL, both of which were implemented in Visual C++ using unmanged code. Both the executable and the DLL are linked with...
0
by: zhangrusi | last post by:
I have a static library that is compiled using the latest version of VC 6. It uses the multithreaded DLL versions of the run-time library, and it uses STL classes. I would like to make use of this...
1
by: wenqiang.zhou | last post by:
i only kown that static members doesnt blong to any object and it have to initialize outside class, inline is near the same as define it will replace in code.but i was puzze by the following codes....
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
2
by: ashesman | last post by:
OK, I have written an application in MS Visual C# using .net. Is it posibble to static link into one self contained .exe file? This would certainly make distribution of a small accessory file...
4
by: nishantb | last post by:
I had posted simillar question some time back. i want to link some libraries statically on NT. currently, product execute command simillar to following. link /STACK:0x20000 /libpath:D:/lib...
0
by: xieml2007 | last post by:
Dear Madam or Sir, I encountered one problem which is quite similiar to the discussions launched at the web site: http://www.thescripts.com/forum/thread280324.html
4
by: aaragon | last post by:
Hi everyone, I have a linking error when using gcc4.2 and static member variables. The class template definition is something around the following: template<> class Element<L2_t: public...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.