Asked  6 Months ago    Answers:  5   Viewed   41 times

Allergro is an open souce C++ addon library for graphics manipulation. How do I add this library to my compiler?

The instructions don't work for me as I have Windows 7. I don't know if the OS matters. I have the Visual Studio Express Edition. The library is a .dll file. How do I add it to my projects?



For Visual Studio you'll want to right click on your project in the solution explorer and then click on Properties.

Next open Configuration Properties and then Linker.

Now you want to add the folder you have the Allegro libraries in to Additional Library Directories,

Linker -> Input you'll add the actual library files under Additional Dependencies.

For the Header Files you'll also want to include their directories under C/C++ -> Additional Include Directories.

If there is a dll have a copy of it in your main project folder, and done.

I would recommend putting the Allegro files in the your project folder and then using local references in for the library and header directories.

Doing this will allow you to run the application on other computers without having to install Allergo on the other computer.

This was written for Visual Studio 2008. For 2010 it should be roughly the same.

Tuesday, June 1, 2021
answered 6 Months ago

The boost libraries needs to be compiled using -fPIC: Please have a look at: How to compile static library with -fPIC from boost.python

Try to add compiler flags by cmake by in your project:

Friday, July 30, 2021
answered 4 Months ago

In addition to Thomas's answer, you need to check the "Generate library layout" option in the Build configuration under the project's Properties page. enter image description here

The files we need to reference:

  • ClassLibrary1(Class Library name) Folder
    • ClassLibrary1.xr.xml
    • CustomPopupControl.xaml
  • ClassLibrary1.dll
  • ClassLibrary1.pri -> Package Resource Index file

Copy these files to anywhere and the UWP project just need to add reference to the ClassLibrary1.dll file in the Visual Studio, all of them will be added automatically.

It just throws a xaml parse exception when I try to use the UserControl on the "InitializeComponent()" method

Perhaps the .pri file is missing when you add the reference.

Wednesday, August 18, 2021
answered 4 Months ago

You can also use the qmake command to do this. Go to the project dir and type "qmake -tp vc".

Tuesday, September 7, 2021
answered 3 Months ago

I think the reason is the way you link to the libraries:


-L option is used to specify the search directories for the libraries, and the libraries themselves are specified using -l option.

It should probably be:

-L../../lib/Linux/ -lxerces-c-3.1

or just put the lib without -L



You may check with nm|grep ParseException (same for libxerces-c.a) if there's such symbol defined. Make sure also that libxerces that you use for compilation (include paths -I) and the one you use for linking is the same.

Passing -Wl,-no-undefined when linking your library will help you see undefined symbols during linking rather than trying to load the library later.

Friday, November 26, 2021
answered 4 Days ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :