#230 Regression: Compilation error when using imagehlp.h

closed-fixed
nobody
None
5
2011-07-21
2011-07-21
Eugen Dedu
No

I am compiling ptlib library and I receive an error:

i686-w64-mingw32-g++ -mms-bitfields -g -O2 -I/home/ededu/softs/ekiga/windows-ekiga3.3.1-mingw64/ptlib-2.10.1/include -mms-bitfields -DPTRACING=1 -I/home/ededu/softs/ekiga/windows-ekiga3.3.1-mingw64/ekiga-3.3.1/win32/directx -fno-exceptions -Wall -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -DNDEBUG -Os -felide-constructors -Wreorder -I/home/ededu/softs/ekiga/windows-ekiga3.3.1-mingw64/include -march=pentium-mmx -c ptlib/msos/assert.cxx -o /home/ededu/softs/ekiga/windows-ekiga3.3.1-mingw64/ptlib-2.10.1/lib_mingw_x86/obj/assert.o
In file included from ptlib/msos/assert.cxx:45:0:
/usr/lib/gcc/i686-w64-mingw32/4.6.1/../../../../i686-w64-mingw32/include/ws2tcpip.h:219:1: error: previous declaration of ‘void __C_ASSERT__(int*)’ with ‘C++’ linkage
/usr/lib/gcc/i686-w64-mingw32/4.6.1/../../../../i686-w64-mingw32/include/imagehlp.h:1157:3: error: conflicts with new declaration with ‘C’ linkage

Line 45 in ptlib/msos/assert.cxx is:
#include <imagehlp.h>

This error does not appear with mingw32. Also, I am pretty sure that the same code compiled with mingw-w64 2-3 months ago, when I used 1.0+20101003 probably. Now I use 1.0+20110523. I use debian.

Hope this information is useful to you, do not hesitate to contact me for more information.

Discussion

  • Ozkan Sezer

    Ozkan Sezer - 2011-07-21

    Moving this to "bugs"

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-07-21
    • labels: 1008201 -->
     
  • Ozkan Sezer

    Ozkan Sezer - 2011-07-21

    suggested patch for C_ASSERT macro

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-07-21

    suggested patch for ws2tcpip.h

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-07-21

    The problem is essentially with the C_ASSERT macro. A fix suggestion is attached. OTOH, looking at ws2tcpip.h reveals a misplaced closure for extern "C", a fix suggestion is attached.

    Posting the suggested patches to the mailing list for review.

     
  • Eugen Dedu

    Eugen Dedu - 2011-07-21

    Thank you for your fast answer.

    For information, using your two patches makes compilation proceed, thank you!

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-07-21

    The two patches are applied to the trunk at rev. 4285
    and to the release branch at rev. 4286.

    The ntdef.h header may need something similar, but that's
    for later.

    Closing as fixed.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-07-21
    • status: open --> closed-fixed
     
  • Ozkan Sezer

    Ozkan Sezer - 2011-07-23

    The EXTERN_C fix caused a regression elsewhere. A new fix is just applied: see rev.4292 for the release branch or rev. 4293 for the trunk.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks