Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6067021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:33:48+00:00 2026-05-23T09:33:48+00:00

I am trying to compile the open-source AAM-library. I have tried in Visual Studio,

  • 0

I am trying to compile the open-source AAM-library. I have tried in Visual Studio, and although it compiled, it had a run-time error. Now I’m trying to compile it in Ubuntu 11.04 using G++. The only makefile provided is a cygwin makefile. I am trying to use this to compile in Ubuntu. (I have included the makefile below). The problem I am having is near the bottom in the lines:

libaamlibrary.dll.a: $(OBJS)
        g++ -fPIC -shared $(OBJS) $(LIBS) -o cygaamlibrary-2.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker libaamlibrary.dll.a

“–enable-auto-image-base” is not a recognised option. I am trying to rewrite these 3 lines to a form that does the same thing but works in Ubuntu, but I am struggling, because I don’t really understand what the lines are doing (e.g., I don’t understand Xlinker and how it should be used). Any advice would be much appreciated… Here is the full makefile for reference:

CPPFLAGS = -I. -I/home/andrew/MscProject/OpenCV-2.3.0/include/opencv -O2 -Wall -g -MD -fPIC
PROGRAMS = libaamlibrary.dll.a  libaamlibrary.a fit build 
LIBS = -L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann  
OBJS = AAM_Util.o VJfacedetect.o AAM_Shape.o AAM_CAM.o AAM_PAW.o AAM_PDM.o AAM_TDM.o AAM_MovieAVI.o AAM_Basic.o AAM_IC.o

all: $(PROGRAMS)

AAM_Util.o: AAM_Util.cpp AAM_Util.h 
    g++  $(CPPFLAGS)  -c -o AAM_Util.o AAM_Util.cpp

AAM_Shape.o: AAM_Shape.cpp AAM_Shape.h
    g++  $(CPPFLAGS)  -c -o AAM_Shape.o AAM_Shape.cpp

AAM_TDM.o: AAM_TDM.cpp AAM_TDM.h 
    g++  $(CPPFLAGS)  -c -o AAM_TDM.o AAM_TDM.cpp

AAM_PDM.o: AAM_PDM.cpp AAM_PDM.h 
    g++  $(CPPFLAGS)  -c -o AAM_PDM.o AAM_PDM.cpp

AAM_PAW.o: AAM_PAW.cpp AAM_PAW.h
    g++  $(CPPFLAGS)  -c -o AAM_PAW.o AAM_PAW.cpp

AAM_CAM.o: AAM_CAM.cpp AAM_CAM.h 
    g++  $(CPPFLAGS)  -c -o AAM_CAM.o AAM_CAM.cpp

VJfacedetect.o: VJfacedetect.cpp VJfacedetect.h 
    g++  $(CPPFLAGS)  -c -o VJfacedetect.o VJfacedetect.cpp

AAM_MovieAVI.o: AAM_MovieAVI.cpp AAM_MovieAVI.h
    g++  $(CPPFLAGS)  -c -o AAM_MovieAVI.o AAM_MovieAVI.cpp

AAM_Basic.o: AAM_Basic.cpp AAM_Basic.h
    g++  $(CPPFLAGS)  -c -o AAM_Basic.o AAM_Basic.cpp

AAM_IC.o: AAM_IC.cpp AAM_IC.h 
    g++  $(CPPFLAGS)  -c -o AAM_IC.o AAM_IC.cpp

demo_build.o: train.cpp
    g++  $(CPPFLAGS)  -c -o demo_build.o train.cpp

demo_fit.o: fit.cpp
    g++  $(CPPFLAGS)  -c -o demo_fit.o fit.cpp

libaamlibrary.a: $(OBJS) 
    ar cru libaamlibrary.a $(OBJS)
    ranlib libaamlibrary.a

libaamlibrary.dll.a: $(OBJS)
    g++ -fPIC -shared $(OBJS) $(LIBS) -o cygaamlibrary-2.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker libaamlibrary.dll.a

fit: demo_fit.o
    g++ -o fit demo_fit.o libaamlibrary.dll.a $(LIBS) 

build: demo_build.o
    g++ -o build demo_build.o libaamlibrary.dll.a $(LIBS)

clean:
    rm -f *.o $(PROGRAMS)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:33:48+00:00Added an answer on May 23, 2026 at 9:33 am

    I agree that you should not use a .dll.a or .dll extension (I believe .a and .so are appropriate), but it seems you can’t do without libaamlibrary[.dll].a.

    Since ‘–enable-auto-image-base’ is prefixed with -Wl, this makes it a linker (ld) option.

    I searched ‘man ld’ and came up with this:

    –enable-auto-image-base
    Automatically choose the image base for DLLs, unless one is
    specified using the “–image-base” argument. By using a hash
    generated from the dllname to create unique image bases for each
    DLL, in-memory collisions and relocations which can delay program
    execution are avoided. [This option is specific to the i386 PE
    targeted port of the linker]

    What is your platform? It is not available to non i386 architectures as I understand, and maybe not needed? So can you try compiling without it?

    By the way I recommend using the excellent Autotools package (automake/autoconf/libtool).

    Regarding –out-implib it is also not available on amd64.

    –out-implib file
    The linker will create the file file which will contain an import
    lib corresponding to the DLL the linker is generating. This import
    lib (which should be called “.dll.a” or “.a” may be used to link
    clients against the generated DLL; this behaviour makes it possible
    to skip a separate “dlltool” import library creation step. [This
    option is specific to the i386 PE targeted port of the linker]

    Sorry but I don’t know what an import lib is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was recently fighting some problems trying to compile an open source library on
I'm trying to compile open source tool abc. When I tried to build the
I am trying to compile an open source library, and meet the following problem.
recently I downloaded this open source project and I am trying to compile it.
So I'm using Visual C++ 6.0, and trying to compile some source code, but
I'm trying to start a C++ Qt application and have it run and compile
Im trying to compile a binary of an open-source project so that our users
I have a complicated open source library that needs to be ported to Android
I am using open source C++ library DCMTK from http://dicom.offis.de/dcmtk.php.en . I have successfully
I'm trying to compile a set of .c files from an open source project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.