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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:31:22+00:00 2026-05-16T17:31:22+00:00

If I have a rule like this in my make file: CC = g++

  • 0

If I have a rule like this in my make file:

CC = g++
CFLAGS = -Wall
COMPILE = $(CC) $(CFLAGS) -c

src = A.cpp \
      main.cpp

test_src = Test.cpp 
test = testAll

OBJFILES := $(patsubst %.cpp,%.o,$(src))
TEST_OBJS := $(patsubst %.cpp,%.o,$(test_src))

%.o: %.cpp
    $(COMPILE) -I UnitTest++/src -LUnitTest++/ -l UnitTest++ -o $@ $< 

I end up including and linking UnitTest++ to non test files such as main and A.cpp
How can I make only make Test classes link with the test libraries?

  • 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-16T17:31:23+00:00Added an answer on May 16, 2026 at 5:31 pm

    Specify which files your rule applies to:

    $(TEST_OBJS): %.o: %.cpp
        $(COMPILE) -I UnitTest++/src -LUnitTest++/ -l UnitTest++ -o $@ $<
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a free shipping price rule which is configured like this: All customer
I want to have URLs like this: some-company-name-deal-id-6.htm So the rewrite rule should ignore
I have this rewrite rule in my .htaccess file, but in PHP when I
I've got a make file that generates multiple targets. Something like: target-a: target-a.src target-include.src
i have this rule in .htaccess file which is internal redirect can anybody tell
I have the following htaccess rule I'd like to apply for every IP address
I have this rule: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !index.php RewriteRule ^(.*)$ index.php?req=$1
I have a text file which I'm trying to parse. The file looks like
i have a usercenter/users_controller,in this controller have code like belows def login end def
I have a makefile with rules that look like this: data/foo-trunk.xml: svn log -v

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.