Click here to Skip to main content
15,888,007 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 9:27
Maximilien31-Jan-20 9:27 
AnswerRe: Regular expression confusion (std::regex_replace). Pin
k505431-Jan-20 10:17
mvek505431-Jan-20 10:17 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 12:21
Maximilien31-Jan-20 12:21 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien3-Feb-20 13:14
Maximilien3-Feb-20 13:14 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
k50544-Feb-20 3:35
mvek50544-Feb-20 3:35 
AnswerRe: Regular expression confusion (std::regex_replace). Pin
Joe Woodbury31-Jan-20 11:58
professionalJoe Woodbury31-Jan-20 11:58 
GeneralRe: Regular expression confusion (std::regex_replace). Pin
Maximilien31-Jan-20 12:21
Maximilien31-Jan-20 12:21 
Questiongcov linker errors Pin
Vaclav_30-Jan-20 9:05
Vaclav_30-Jan-20 9:05 
I have now build both project and its library using ARM architecture.
The library compiles and links - no error.
The library contains one test C++ class with only constructor / destructor implemented.
This is important to note - see the NOTEs at the end of the post.

The main program compiles but fails to link with errors indicating problem with "gcov".

The attached partial crosscompiler make output of library build indicates addition of "gcov" related options.
They have been put there as standard IDE options for building library.
I did NOT added these options.

make -j4 all 
Building file: ../MODULE/M_ARM_TEST/CARMTEST.cpp
Invoking: Cross G++ Compiler
arm-linux-gnueabihf-g++ -O0 -g3 -p -pg -ftest-coverage -fprofile-arcs -Wall -c -fmessage-length=0 -v -MMD -MP -MF"MODULE/M_ARM_TEST/CARMTEST.d" -MT"MODULE/M_ARM_TEST/CARMTEST.o" -o "MODULE/M_ARM_TEST/CARMTEST.o" "../MODULE/M_ARM_TEST/CARMTEST.cpp"
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-g++



The attached partial output of main program posts the "gcov" errors.

lRPI_BT_LIB_ARM -lbluetooth
/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB_ARM/Debug/libRPI_BT_LIB_ARM.a(CARMTEST.o): In function `_GLOBAL__sub_I_65535_0__ZNSt10C_ARM_TESTC2Ev':
/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB_ARM/Debug/../MODULE/M_ARM_TEST/CARMTEST.cpp:42: undefined reference to `__gcov_init'
/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB_ARM/Debug/libRPI_BT_LIB_ARM.a(CARMTEST.o):(.data+0x28): undefined reference to `__gcov_merge_add'
collect2: error: ld returned 1 exit status


NOTE The library source code line #42 is where error is actually indicated in output , at the closing bracket of "std" namespace comment

NOTE 42 } /* namespace std */

1. What is the purpose of having -ftest-coverage -fprofile-arcs option SPECIFICALLY for library? I do not have them in any other IDE build programs.
I did not try to delete them, perhaps after I have some more knowledge about their purpose.
2. I did try to add -lgcov to program linker but it did not work.
I understand that gcov is some kind of utility tracking application and not sure why I need it.

Any help woudl be appreciated.
Cheers
AnswerRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 9:15
mveRichard MacCutchan30-Jan-20 9:15 
GeneralRe: gcov linker errors Pin
Vaclav_30-Jan-20 9:49
Vaclav_30-Jan-20 9:49 
GeneralRe: gcov linker errors Pin
Richard MacCutchan30-Jan-20 9:55
mveRichard MacCutchan30-Jan-20 9:55 
GeneralRe: gcov linker errors Pin
leon de boer30-Jan-20 21:43
leon de boer30-Jan-20 21:43 
GeneralRe: gcov linker errors Pin
Vaclav_31-Jan-20 5:32
Vaclav_31-Jan-20 5:32 
AnswerSOLVED Re: gcov linker errors Pin
Vaclav_30-Jan-20 10:30
Vaclav_30-Jan-20 10:30 
QuestionPNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 2:53
sdancer7530-Jan-20 2:53 
QuestionRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
Richard MacCutchan30-Jan-20 6:29
mveRichard MacCutchan30-Jan-20 6:29 
AnswerRe: PNG image shown is missing 1 pixel right and 1 pixel bottom Pin
sdancer7530-Jan-20 6:53
sdancer7530-Jan-20 6:53 
QuestionIGNORE THIS !!! file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 5:45
Vaclav_29-Jan-20 5:45 
AnswerRe: file not recognized: File format not recognized Pin
k505429-Jan-20 6:03
mvek505429-Jan-20 6:03 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 6:44
Vaclav_29-Jan-20 6:44 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 6:58
Vaclav_29-Jan-20 6:58 
GeneralRe: file not recognized: File format not recognized Pin
k505429-Jan-20 7:15
mvek505429-Jan-20 7:15 
GeneralRe: file not recognized: File format not recognized Pin
Vaclav_29-Jan-20 15:39
Vaclav_29-Jan-20 15:39 
Questionreplace words in a file Pin
Member 1295754729-Jan-20 4:19
Member 1295754729-Jan-20 4:19 
AnswerRe: replace words in a file Pin
Victor Nijegorodov29-Jan-20 5:30
Victor Nijegorodov29-Jan-20 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.