If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I looked through my window, there are no signs ... but, its definitely planet Earth.

Posts

88

0.8.1 mingw32 crush when Core is deinit

Hello,

I'm new to ClanLib and first I need to say amazing! Keep up the good work! Everything works fine until CL_SetupCore::deinit() is called. I'm using 0.8.1 version of your lib and in TicTacToe game breaks, here's backtrace:

I looked through my window, there are no signs ... but, its definitely planet Earth.

Posts

88

ADDITION TO PREVIOUS:

During compilation there was an error compiler reported, it seemed that boolean type was declared as int instead of unsigned char, so I altered the file and instead of int boolean type was unsined char. Now, I see that inside CL_Core::deinit there are methods that expect this type to be int and 4 bytes. Could this be a source of crash?

At the time, it seemed logical for me to alter that single file instead all the other files that were based on boolean being unsigned char. I'm having mingw 3.4.5, how's it possible that original mingw include files expect unsigned char for boolean type and your include files expect it to be int?

I looked through my window, there are no signs ... but, its definitely planet Earth.

Posts

88

Sphair thanks, its working, I assume destructor is doing all the cleaning?

rpcndr.h file in mingw includes that is used during compilation of ClanLib is having typedef unsigned char boolean, while your files expect typedef int boolean. I had to alter this to be able to compile the lib without errors. Did I do the right thing?

You tutorial on TicTacToe is using static, so I thought that was ok, I just followed the tutorial.

I looked through my window, there are no signs ... but, its definitely planet Earth.

Posts

88

rpcndr.h had typedef unsigned char boolean and files related to libjpeg and 3-4 more files had conflicting definition of boolean, they had typedef int boolean instead of boolean type defined in rpcndr.h, so first I altered everything to unsigned char, but yesterday I altered just rpcndr.h to typedef int boolean and recompiled clanLib, deinit was crushing at the same spot. But it seems that when its called through destructor it works fine and it has nothing to do with boolean, my mistake.

I'm not that good in C++, so I don't understand many things. Its actually a miracle that I even compiled your lib .. I just followed the tutorial and downloaded precompiled patches for mingw from site you're referencing. Its obvious that your framework is targeted for people with poor knowledge of C++ enabling them to focus on developing the game and not coding, which is great and it works in my case. Thank you!

hi, I'm getting some compile errors and I chanced across this thread. It has to do with typedefs so it sounds related to this i think.. anyway I hope someone can help me out because there are some aspects of the language that are still mysterious to me!

as this is the .8.1 release I'm trying to compile I'm sure the problem is somewhere between the keyboard and the chair. It could even be a setting I overlooked.. but I'm out of resource on this one .

I'm compiling on ubuntu linux for a windows target with mingw, per the excellently specific instructions at http://basic.xullum.net/clanlib/old-index.html (on the 'documentation' page of clanlib.org). Thanks in advance for any advice.

This compile error is caused by the libjpeg people having named something Boolean, and then it seems something from Microsoft (or mingw?) also having named something Boolean. The compiler notices they do not agree on what Boolean is supposed to be and aborts the compilation.

There are basically two ways to solve this problem:

1) Change libjpeg's source code to name Boolean something else

or

2) Figure out how rpcndr.h gets included and avoid this so the compiler only see the jpeg definition in this source file.