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 8818923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:13:34+00:00 2026-06-14T05:13:34+00:00

Qt 4.6.1 In the following .pro file, when I use the statement sources =

  • 0

Qt 4.6.1

In the following .pro file, when I use the statement

sources = ef.cpp

I get following errors:

RInside.h: No such file or directory

enter image description here

Then when I replace = with := like:

sources := ef.cpp

the above error vanishes, and I get a new error:

error: undefined reference to qMain(int, char**)

enter image description here

From here: https://stackoverflow.com/a/448939/462608

VARIABLE = value Normal setting of a variable – values within it are
recursively expanded when the variable is used, not when it’s declared

VARIABLE := value Setting of a variable with simple expansion of the
values inside – values within it are expanded at declaration time.

I wish to understand what’s happening here, and what’s the solution.

.cpp

#include <RInside.h>
int main(int argc, char *argv[]) 
{
    RInside R(argc, argv);

    R["txt"] = "Hello, world!\n";

    R.parseEvalQ ("cat(txt)");

    exit(0);
}

.pro

TEMPLATE    = app
TARGET      = 
DEPENDPATH  += .
INCLUDEPATH += .

R_HOME  := 'c:/R-2.15.1'

# Input
sources  = ef.cpp
programs := $(sources:.cpp=)

## include headers and libraries for R
RCPPFLAGS :=        $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config --cppflags)
RLDFLAGS  :=        $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config --ldflags)
RBLAS     :=        $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config BLAS_LIBS)
RLAPACK   :=        $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config LAPACK_LIBS)

## include headers and libraries for Rcpp interface classes
RCPPINCL  :=        $(shell echo 'Rcpp:::CxxFlags()' | $(R_HOME)/bin/R $(R_ARCH) --vanilla 

--slave)
RCPPLIBS  :=        $(shell echo 'Rcpp:::LdFlags()'  | $(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)


## include headers and libraries for RInside embedding classes
RINSIDEINCL :=      $(shell echo 'RInside:::CxxFlags()' | $(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)
RINSIDELIBS :=      $(shell echo 'RInside:::LdFlags()'  | $(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)


## compiler etc settings used in default make rules
CXX        := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CXX)
CPPFLAGS   := -Wall $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CPPFLAGS)
#CXXFLAGS  := $(RCPPFLAGS) $(RCPPINCL) $(RINSIDEINCL) $(shell $(R_HOME)/bin/R $(R_ARCH) 

CMD config CXXFLAGS)
QMAKE_CXXFLAGS := $(RCPPFLAGS) $(RCPPINCL) $(RINSIDEINCL) $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CXXFLAGS)
LDFLAGS    = -s
QMAKE_LIBS := $(RLDFLAGS) $(RBLAS) $(RLAPACK) $(RINSIDELIBS) $(RCPPLIBS)
CC         := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CXX)
  • 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-06-14T05:13:35+00:00Added an answer on June 14, 2026 at 5:13 am

    This doesn’t look like a Qt project, so you should probably disable linking against Qt libs. Set QT and CONFIG to be empty:

    QT =
    CONFIG =
    

    If on other hand this is a Qt project that should link against Qt libraries, then the problem is that you’re overwriting vital variables, like QMAKE_LIBS and QMAKE_CXXFLAGS. Use +=, not :=. Also, use LIBS, not QMAKE_LIBS.

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

Sidebar

Related Questions

I want to create a RSL with Flash Pro CS5 and then use it
For some reason when I use fopen I get the following error: failed to
I use the following statement prepared and bound in ODBC: SELECT (CASE profile WHEN
With the following code below, There is an error saying File /home/user/web_pro/info/views.py, line 184,
I need help to achieve the following through a batch file. Here's what I'm
Java I am using paypal website pro sdk SOAP calls problem is following line
I have writen the following code but when i execute him i get this
Is there a way to get rid of the .FirstOrDefault() with the following setup.
Help! The following trigger results in blocking once executed: USE [Automation] GO /****** Object:
I'm not exactly a pro at this, so please forgive me for asking such

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.