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

  • Home
  • SEARCH
  • 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 309807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:46:32+00:00 2026-05-12T07:46:32+00:00

This seems like it should be really simple. I compiled a library in Qt

  • 0

This seems like it should be really simple. I compiled a library in Qt (this newmat library), and produced the file libnewmat.a. Now I need to integrate this library into another project but I just can’t get it to work.

I’ve tried a few different things with the LIBS variable in my .pro file including:

Win32:LIBS += libnewmat.a #library is in same directory as the project

Win32:LIBS += "C:/...path.../libnewmat.a"

Win32:LIBS += L"C:/...path..." -lnewmat

I’ve even tried using forward and back slashes in the path but it made no difference. I also include this check to make sure the library is actually found:

!exists(libnewmat.a) {
    error("libnewmat.a does not exist")
}

So I know that isn’t the problem. What I don’t understand is that when i ctrl+f the compiler output (which displays the commands that qmake is using at the command line), I don’t find any reference to the library. For some reason my LIBS variable isn’t making any difference on the command line which is where I would expect it to be. Here is a sample of the compiler output where I would expect the library to be referenced if anyone would like to double check:

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\2009.02\qt\include\QtCore" -I"..\..\..\..\Qt\2009.02\qt\include\QtGui" -I"..\..\..\..\Qt\2009.02\qt\include\QtOpenGL" -I"..\..\..\..\Qt\2009.02\qt\include" -I"..\Visual Studio Projects\NewMatProj\newmat10" -I"..\..\..\..\Qt\2009.02\qt\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\2009.02\qt\mkspecs\win32-g++" -o debug\moc_Window.o debug\moc_Window.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\GLPractice.exe debug/main.o debug/GLWidget.o debug/Window.o debug/CGSWidget.o debug/moc_GLWidget.o debug/moc_Window.o -L"c:\Qt\2009.02\qt\lib" -lopengl32 -lglu32 -lgdi32 -luser32 -lmingw32 -lqtmaind -lQtOpenGLd4 -lQtGuid4 -lQtCored4

I suspect there is something really simple that I’m missing here.

I’m using QtCreator on Windows Vista.

  • 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-12T07:46:33+00:00Added an answer on May 12, 2026 at 7:46 am

    I think the scope conditions are case sensitive:

    win32:LIBS += libnewmat.a  # lowercase w
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 307k
  • Answers 307k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, I have implemented several system with GSM modems. You… May 13, 2026 at 9:26 pm
  • Editorial Team
    Editorial Team added an answer If you're giving all of the text boxes the same… May 13, 2026 at 9:26 pm
  • Editorial Team
    Editorial Team added an answer "Address already in use", aka WSAEADDRINUSE (10048), means that when… May 13, 2026 at 9:26 pm

Related Questions

I am trying to call out to a legacy dll compiled from FORTRAN code.
Consider this scenario. I have an object, lets call it.... Foo. Foo raises a
I'm working on my compiler homework and I have the following question: Consider the
Is it possible to make a C++ header file (.h) that declares a class,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.