static dll linking

A

amarok

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

=?ISO-8859-2?Q?Erik_Wikstr=F6m?=

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.
 

nmi

Joined
Jul 6, 2007
Messages
13
Reaction score
0
amarok said:
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?

If you are using MS Visual Studio you just add the .lib file of the library to your project, just like you add the sourcefiles and headers.
 
D

Dennis Jones

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top