Ryan Mansfield(deleted)
|
Re: -lang-c++ Linker option
|
Ryan Mansfield(deleted)
10/06/2008 8:59 AM
post14509
|
Re: -lang-c++ Linker option
Dooeui Hong wrote:
> Thanks for your replay.
>
> Following is my makefile when I fail to build.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> CC = qcc
> LD = QCC
>
> CFLAGS += $(DEBUG) -c $(INCLUDES) -V3.3.5,gcc_ntoppcbe -O2
> LDFLAGS+= $(DEBUG) -V3.3.5,gcc_ntoppcbe -M
> ...
>
> ./$(OBJ_DIR)/NADBurnTesterApp : $(OBJECTS)
> $(LD) $(LDFLAGS) -o $@ $(OBJECTS) -L $(LIB_DIR2) -llib_name
That looks like it should work. Which host are you using? Windows?
Can you add -v to the link for the failing case and provide the output?
I wrote a very simple test case and was unable to reproduce it. The
following works:
# cat main.c
int main() { }
# cat hw.cc
#include <iostream>
int foo() {
std::cout << "Hello world" << std::endl;
}
# qcc -V3.3.5,gcc_ntoppcbe main.c -c
# qcc -V3.3.5,gcc_ntoppcbe hw.cc -c
# QCC -V3.3.5,gcc_ntoppcbe main.o hw.o
If I link with qcc instead of QCC, the driver doesn't know it is linking
in C++ and doesn't link in libsupc++.
Regards,
Ryan Mansfield
|
|
|