[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrong link option given to g++

From: John Calcote
Subject: Re: Wrong link option given to g++
Date: Thu, 12 Mar 2015 16:53:35 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hi Arthur,

Look carefully at your file or any scripts calling your makefile. See if you find anyone setting CFLAGS, CPPFLAGS, etc on the way in. They maybe adding -c (erroneously) to these variables.

To answer your question, the TEST macro should be completely independent of the check programs being built - it merely specifies which scripts/programs to run when tests are actually executed.


On 3/12/2015 4:23 PM, Arthur Schwarz wrote:
Win7-64 bit
Cygwin 64-bit
g++ 4.9.2

I'm trying to link test program. The linker command option given to g++
during 'make check' says "don't link". Any way around this?

check_PROGRAMS     = test
test_INCLUDE       = -I$(top_srcdir)/src
test_SOURCES       = $(testCPP) $(testHead)
test_LDADD         = libslip.a

'make check' contains:
g++ -std=gnu++11 -Wall -Wno-reorder -Wno-unused-value -Wno-address
-Wno-sequence-point -Wmaybe-uninitialized -c -g  -o test.exe Test.o
TestErrors.o TestGlobal.o TestHeader.o TestIO.o TestMisc.o TestOperators.o
TestReader.o TestReplace.o TestSequencer.o TestUtilities.o  libslip.a

which works when the "-c" option is removed.

g++ --help  =>  -c  Compile and assemble, but do not link

Is the linker command supposed to be given in a test script in the file (TEST=script)?

The failure of the past is the challenge of the present and the success of
the future.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]