Menu

#1 Mingw compile

closed-fixed
None
5
2011-10-22
2011-03-25
No

Hi everyone

I test for compile with mingw and show this error:

C:\Documents and Settings\Antonio\Mis documentos\xlslib\src\xlslib\globalrec.cpp|760|error: no match for 'operator=' in 'str2 = str1'|

C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/basic_string.h:451: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = unsigned16_t, _Traits = std::char_traits<unsigned16_t>, _Alloc = std::allocator<unsigned16_t>]
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings

A idea?

Discussion

  • Antonio Vico

    Antonio Vico - 2011-03-25

    Hello again:

    I've seen in the forums is a question on Mingw and do not know if this is the right place for raising the issue. In any case, add information about it.

    The compilation I've tried CodeBlocs and comment line 760 of globalrec.cpp compiles (4 warnings).

    Testing the library with my program (http://qualitycontrol.sf.net) I have problems with the characters á, é, etc (unicode problems not solved).
    The program uses SQLite and wxwidgets (with wxsqlite3). The text retrieved from the database to convert it from wxstring (wxwidgets format) to string but the characters are not well (Granulom←trico rather than Granulométrico, etc).

    Any suggestions?

     
  • Ger Hobbelt

    Ger Hobbelt - 2011-03-25

    Are you using the latest code (svn)? There's nothing at line 760 there and IIRC the str2 = str1 was something in an old revision.

     
  • Antonio Vico

    Antonio Vico - 2011-03-26

    Use xlslib-1.6.0.zip donwloaded from sourceforge.
    I download from svn for test !

     
  • Antonio Vico

    Antonio Vico - 2011-03-26

    for svn code i have a lot of warnings (warning: no newline at end of file)

    and 2 errors:

    ../../../xlslib/src/common/xls_pshpack1.h:20:2: #error "must have some sort of packing #pragma for this tool to build"

    ../../../xlslib/src/common/xls_poppack.h:20:2: #error "must have some sort of packing #pragma for this tool to build"

    Compilation is in Windows XP with CodeBlocks 10.05 and options for compilations are using codeBlocks option "import ms visual studio project" from msvc2008 build.

     
  • Ger Hobbelt

    Ger Hobbelt - 2011-03-27

    That top bit should've read:

    [...] to a properly setup ... xlsconfig.h header file or equivalent.

     
  • Ger Hobbelt

    Ger Hobbelt - 2011-03-27

    By the way, I'm very curious which file(s) made CodeBlocks report that '(warning: no newline at end of file)' and the other warnings.

    email might be handy for that (I'm on the road so can't promise instant reply, but it might be easier that way to pass along compiler logs): email either through SF or go to http://hobbelt.com and hit mailto: link there.

     
  • Ger Hobbelt

    Ger Hobbelt - 2011-03-27

    @avicom1: got your email, but any reply to you bounces, both from gmail and from 'Send Message' inside Sf itself :-S

    I don't know why, but when replying from gmail I got this
    (is SF on the blink again?) -- @ is replaced with {at} below:

    ---
    Delivery to the following recipient failed permanently:

    avicom1 {at} users.sourceforge.net

    Technical details of permanent failure:
    Google tried to deliver your message, but it was rejected by
    the recipient domain. We recommend contacting the other
    email provider for further information about the cause of
    this error. The error that the other server returned was:
    550 550 unknown user (state 17).
    ----

    Anyway, do you have another email address where I can send
    stuff to?

    ger {at} hobbelt.com

     
  • smu johnson

    smu johnson - 2011-10-13

    I came here via Googling, and I have the exact same problem.

    All I did was install MSYS + MinGW, run ./configure, and then make. And I get the exact same error.

    Compiles fine on Ubuntu Linux though... but as you probably guessed... I'm trying to get this to compile in Win32.

     
  • David Hoerl

    David Hoerl - 2011-10-13

    Remove thjs block:

    #if !defined(_MSC_VER) /* MSVC2005 doesn't accept this for ANSI builds at least! */
    // if character size of both strings is the same, well, we should be able to just assign them
    if(sizeof(unichar_t) == sizeof(unsigned16_t)) {
    str2 = str1;
    return;
    }
    #endif

    Let me know a #define that I can use to detect MINGW and I will fix this in the source tree.

     
  • David Hoerl

    David Hoerl - 2011-10-13
    • assigned_to: nobody --> dhoerl
     
  • smu johnson

    smu johnson - 2011-10-13

    Thanks, it worked.

    Also, the keyword you're looking for is: __MINGW32__ . This is also set on 64-bit versions of MinGW too, so it should suffice.

     
  • David Hoerl

    David Hoerl - 2011-10-22

    Fixed in 2.0.0

     
  • David Hoerl

    David Hoerl - 2011-10-22
    • status: open --> closed-fixed
     

Log in to post a comment.

Auth0 Logo