Use g++ to replace gcc when link the .cpp file
2014-03-25 13:11
344 查看
Use g++ to replace gcc when link the .cpp file
Q:
I have a small program, test.c. It runs OK. This is on Linux (kernel
2.6.8.1, GCC 3.4.1).
I decided to convert it to C++ before expanding it to a larger program. I
changed the filename to test.cpp and added
extern "C" {
}
around main and all the non-static subroutines. It compiles OK, but when I
link it, it says:
test.o (.eh_frame+0x11): undefined reference to '__gxx_personality_v0'
A:
use g++ to link
Q:
I have a small program, test.c. It runs OK. This is on Linux (kernel
2.6.8.1, GCC 3.4.1).
I decided to convert it to C++ before expanding it to a larger program. I
changed the filename to test.cpp and added
extern "C" {
}
around main and all the non-static subroutines. It compiles OK, but when I
link it, it says:
test.o (.eh_frame+0x11): undefined reference to '__gxx_personality_v0'
A:
use g++ to link
相关文章推荐
- The source file is different from when the module was built. Would you like the debugger to use it anyway?
- HOW TO Use the GCC specs file
- The source file is different from when the module was built. Would you like the debugger to use it anyway?
- HOWTO Use the GCC specs file
- Use #CSS attribute selectors to display links when <a> has no text value but the `href` has a link
- HOWTO Use the GCC specs file
- The source files "*\A.cpp " and "*\A.cpp " are both configured to produce the output file "*\A.obj "
- The XML Litmus Test Understanding When and Why to Use XML
- Resolution to the record count increasing of the file exported from DB when ‘0A’ is included in it
- 126.Identify the two situations in which you use the alert log file in your database to check the de
- when to use the macro "assert(expression)"
- 802.11 WDS how does it work, when to use it and what are the limitations
- How can I force Python's file.write() to use the same newline format in Windows as in Linux (“\r\n”
- RMAN-06496: must use the TO clause when the database is mounted or open
- Linux - How to remove the new line at the end of file when using vim
- Resolution to the record count increasing of the file exported from DB when ‘0A’ is included in it
- Please be careful when include a resouce.h file to any cpp to avoid regression.
- Error message when you try to use the Live Meeting console to connect to Communications Server 2007: "Live Meeting cannot connect to the meeting."
- How to use GCC to build DLL by DEF file in MinGW?
- remove the prompt when use vista to connect to other os older than vista.