cpputest+eclipse+Cygwin or cpputest+eclipse+Mingw?

38 views
Skip to first unread message

GuangHui Zhang

unread,
Oct 11, 2021, 4:11:12 AM10/11/21
to cpputest
Hello everyone.
A new problem was encountered in debugging CppUTest:
At first I didn’t know that the imported project was developed with eclipse+Mingw+cpputest.
I imported the project into the use environment I established: eclipse+cywin64+cpputest.
However, it seems that there is no issue similar to the compiler version during the debugging process, so I did not consider the issue of the GNU tool chain. Each code module in the project has written its own makefile, and the corresponding module code is selected for construction.
The structure of the project is as follows:
project:
-----_CppUTestBuildResuts (contains the structure of the build, executable file)
------_Test_src_surveys (contains the subdir.mk generated by the build)
-------unit_tests (including source files src, mock files, test files)
When I choose one of the build options to build, the console error appears as follows (I have listed some of them):
../../../src/../../CppUTest/include/CppUTest/MemoryLeakDetectorNewMacros.h:54:63: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]

../../../src/../../CppUTest/include/CppUTest/MemoryLeakDetectorNewMacros.h:68:35: error: no matching function for call to'operator new(const char [65], int )'
   68 | #define new new(__FILE__, __LINE__)

/usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/bits/allocator.h:97:11: error: expected primary-expression before'void'
   97 | {::new((void *)__p) _Up(std::forward<_Args>(__args)...);}
      | ^~~~

Hope to get your help.
thanks
GuangHui.

Bas Vodde

unread,
Oct 12, 2021, 1:14:07 PM10/12/21
to 'GuangHui Zhang' via cpputest

Hi Zhang GuangHui,

At least the last error is because you included a STL header before including the CppUTest header. Some more info on this at:

(in the STL section).

Good luck,

Thanks,

BAs

--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/a0c34bfd-518c-4eff-8f88-eb49e8b6dfd9n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages