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?
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?
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.
Use xlslib-1.6.0.zip donwloaded from sourceforge.
I download from svn for test !
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.
The #pragma errors are indicative of a failed import as the compiler is not pointed to a properly set up
See also your local /src/common/xls_poppack.h copy (online at: http://xlslib.svn.sourceforge.net/viewvc/xlslib/trunk/xlslib/src/common/xls_poppack.h?revision=127&view=markup )
Warning: when you just take the MSVC2008 config headerfile ( http://xlslib.svn.sourceforge.net/viewvc/xlslib/trunk/xlslib/build/msvc2008/ac-config.win32.h?revision=127&view=markup ) you'll most probably run into different trouble because you imported a Microsoft project (for a MS compiler) and that setup uses elements which are Microsoft specific (using the VC compiler), while I understand you're using GCC as a compiler underneath Code::Blocks.
See also CodeBlocks FAQ, e.g. http://wiki.codeblocks.org/index.php?title=FAQ#Q:_I_imported_a_MSVCToolkit_project.2Fworkspace.2C_but_Code::Blocks_insists_on_trying_to_use_GCC._What.27s_wrong.3F
I haven't yet worked with CodeBlocks myself, so I can't be as specific as I'd want to, but xlslib also comes with a ./configure script for UNIXes and one may consider Mingw+GCC a 'unix'-y thing, even while it runs on Windows. When you can run that, it should produce, among other things, a xlsconfig.h matching your environment.
Another alternative would be to have a look at the prefab config file for the MSVC project, make a copy for Mingw/GCC/CodeBlocks, edit the items in there to match your compiler/build environment and make sure to point the compiler at that new config header file.
That top bit should've read:
[...] to a properly setup ... xlsconfig.h header file or equivalent.
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.
@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
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.
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.
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.
Fixed in 2.0.0