UnitTest++ prob; "undefined reference to `_Unwind_Resume`

CodeLite installation/troubleshooting forum
jasper77
CodeLite Curious
Posts: 7
Joined: Wed Jun 29, 2011 1:06 am
Genuine User: Yes
IDE Question: C++
Contact:

UnitTest++ prob; "undefined reference to `_Unwind_Resume`

Post by jasper77 »

Are there some complete installation instructions I've been unable to find? Getting CodeLite (v2.10.0.4778) to work on WindowsXP has not been intuitive.
I installed CodeLite along with MinGW and UnitTest++ all directly off C: instead of using "Program Files".

I have tried to use UnitTest++ two different ways and they both fail the same way. One is as a managed g++ console application, and the other is as a managed UnitTest++ project. First, they failed to find the UnitTest++ library, so I realized I need to build the library first, entered the UnitTest++ directory, and typed "make". It's using gnu make 3.81, which is what I got with my recent installation of cygwin. I got the library, but the tests failed to build because "error: `strcpy' is not a member of `std'

First, do I need to use a more recent version of gcc? If so how do I get it?

So now I have the library and tell the projects' Common Settings | Linker where to find the library and the library name. The build failed because it did not recognize mingw32-make.exe as a valid command, so I added that path to the system path manually. Now, when I try to build, I get errors like this:
C:/UnitTest++-1.3/libUnitTest++./a(TestRunner.o): In function `MemoryOutStream`:
/cygdrive/c/UnitTest++-1.3/src/MemoryOutStream.h:16: undefined reference to `_Unwind_Resume'

Perhaps this is related to the way I built the library? When I try to invoke make from the Windows command prompt, it wants to use gnu make 3.8.0 (from UnixUtils) and it fails when trying to use sed.exe.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: UnitTest++ prob; "undefined reference to `_Unwind_Resume`

Post by eranif »

jasper77 wrote:/cygdrive/c/UnitTest++-1.3/src/MemoryOutStream.h:16: undefined reference to `_Unwind_Resume'
You are mixing cygwin and MinGW this is why it does not work for you

codelite was meant to work with MinGW and not with Cygwin (it can work with cygwin, but with some tweaks)

Eran
Make sure you have read the HOW TO POST thread
jasper77
CodeLite Curious
Posts: 7
Joined: Wed Jun 29, 2011 1:06 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: UnitTest++ prob; "undefined reference to `_Unwind_Resume`

Post by jasper77 »

eranif wrote:
You are mixing cygwin and MinGW this is why it does not work for you
How do I untangle CodeLite from cygwin? I assume CodeLite is trying to use cygwin because I built the UnitTest++ library using cygwin, and that if I build the library from the cmd prompt it'll fix this problem. I used cygwin because trying to build from the C:\> cmd prompt did not work.

Code: Select all

C:\UnitTest++-1.3>make
src/AssertException.cpp
c:\UnixUtils\sed.exe: -e expression #4, char 1: Unknown command: `C'
make: *** [src/AssertException.o] Error 1
It looks like the above is trying to use make in UnixUtils. I am also unsuccessful when trying to use mingw32-make explicitly:

Code: Select all

C:\UnitTest++-1.3>"..\MinGW-4.4.1\bin\mingw32-make.exe"
src/AssertException.cpp
sed: -e expression #1, char 1: Unknown command: `''
<built-in>:0: fatal error: when writing output to : Invalid argument
compilation terminated.
mingw32-make: *** [src/AssertException.o] Error 1
Could it be that the installer would normally install MSYS make.exe and sed.exe, but detected them in UnixUtils and so didn't install them? If that's the case I could uninstall UnixUtils, install MSYS, and try again.
Last edited by jasper77 on Wed Jun 29, 2011 6:28 pm, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: UnitTest++ prob; "undefined reference to `_Unwind_Resume`

Post by eranif »

jasper77 wrote:I used cygwin because trying to build from the C:\> cmd prompt did not work. However, the MinGW installed by the CodeLite installer doesn't have a make.exe. It also doesn't have sed, which the UnitTest++ makefile requires. Should those have been installed along with MinGW, or is it assumed I will also install MSYS separately? It seems the make.exe in UnixUtils can't handle the job:
If you installed the UnitTest++1.3 that comes with codelite, you will find a codelite workspace there:
UnitTest++_Windows.workspace

Just open it with codelite and build it. The workspace comes with two configurations: Debug and Release both will produce a static library

Eran
Make sure you have read the HOW TO POST thread
jasper77
CodeLite Curious
Posts: 7
Joined: Wed Jun 29, 2011 1:06 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: UnitTest++ prob; "undefined reference to `_Unwind_Resume`

Post by jasper77 »

Ah, that did it, thank you. I hadn't noticed the UnitTest++ workspace.
Post Reply