473,398 Members | 2,343 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,398 software developers and data experts.

How to link an external library in my C++ application?

How can I use one external library in my C++ program?
May 4 '12 #1
3 1757
weaknessforcats
9,208 Expert Mod 8TB
Depends upon your operating system.

With Windows you can load an externa library at run-time by a call to LoadLibrary(). You may do the same thing at compile time using a Visual C++ DLL project. In this case, Visual C++ generates a .lib file which you use as the link in your program.. When you make a call to this library, the function in the .lib does a LoadLibrary and then calls the function you want from the external library (the DLL) using GetProcAddress.
May 4 '12 #2
I am using C++ on Solaris. Hence the Makefile utility for compiling. Please let me know how can I link the external library to my program.


@weaknessforcats
May 4 '12 #3
weaknessforcats
9,208 Expert Mod 8TB
There should be man pages for this with examples.

Makefiles vary in syntax based on the OS so you are better off looking at the docs that come with your C++ compiler.

Essentially after the compile phase is compleete, there will be lines describing linker input and here is where you specify your libraries.

I believe makefiles are processed from the end to the beginning so your compile steps will be at the end of the file and the linker steps will appear before them.

http://edndoc.esri.com/arcobjects/9....le.Solaris.htm
May 4 '12 #4

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

Similar topics

3
by: SpaceCowboy | last post by:
To begin, I'm using JBuilder9 under J2ME and MIDP 1.0. I'm trying to use an external library. I can get my code to compile, but I can't get the library code working on the emulator. I'm...
2
by: free2cric | last post by:
Hi, I have two c++ static libraries say A.lib and B.lib. I am creating third static library C I create project in microsoft visual studio as win32 static library. I go to project-> settings ->...
1
by: sandyde2 | last post by:
Hi all, I am writing a java application as a mozilla extension. Because mozilla uses javascript for the frontend, i need the javascript to call my external java application and pass one...
3
by: S. van Beek | last post by:
Dear reader, In the module window you can make a link to an external library within the reference form. The reference form can be activated with Tools/References... In the menu bar.
3
by: craig | last post by:
I was just wondering if anyone else may have incorporated the original Microsoft Exception Management Application Block (EMAB) or Data Access Application Block (DAAB) into one of their applications...
6
by: tekmicha | last post by:
Hallo, I am a newbie in C and I have a question regarding C libraries. I got an application in C and I am trying to add some new features on it for my work. The problem is this application...
2
by: Kirill Simonov | last post by:
Hi, I've written a pure Python module, which could optionally use an external C library. The external library is not required to be on the user computer however, so I'd like not to build the...
3
by: Big Charles | last post by:
Hi, We have developed an ASP.NET web application and are planning to host it in an external Server, which provides us a good bandwidht. We need to put he web application outside because the...
2
by: Felix | last post by:
Hello, I use a #define like WITH_MYSTUFF to conditionally compile code within #ifdef WITH_MYSTUFF. I would now like the same define to conditionally link with a library. In the linker settings...
5
by: goje | last post by:
Hello I want to capture the Output of the External Console Application in my application and also want to send commands to External Console Application from my application. Someone have some...
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.