MINGW: Tons of errors when compiling CEGUI

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

molma100
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 04, 2015 18:44

MINGW: Tons of errors when compiling CEGUI

Postby molma100 » Fri Sep 04, 2015 23:02

Hello, I am new to this forum, and before I jump into my issue, I want to make sure I am at the right place.

What I need is some form of keyboard reading system to output text to a window in my ogre3d game. (I use OIS, and I will make my own text sprites and such, meaning I do not need the GUI portion of CEGUI) I heard that CEGUI can do that, but it really seems to give me way more than I ask for. (All I want is to pull the keyboard info, and I can do everything else...) If there is a better or easier way to do that, then please either point me in the right direction or show me another place I can go to attempt this (Before I mess up my game too much with CEGUI)

Onward with the errors. I have a ton of them just from adding CEGUI in and attempting to compile. If necessary I can provide more info on request.

Code: Select all

z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|77|error: '::memchr' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|78|error: '::memcmp' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|79|error: '::memcpy' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|80|error: '::memmove' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|81|error: '::memset' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|82|error: '::strcat' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|83|error: '::strcmp' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|84|error: '::strcoll' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|85|error: '::strcpy' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|86|error: '::strcspn' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|87|error: '::strerror' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|88|error: '::strlen' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|89|error: '::strncat' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|90|error: '::strncmp' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|91|error: '::strncpy' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|92|error: '::strspn' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|93|error: '::strtok' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|94|error: '::strxfrm' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|95|error: '::strchr' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|96|error: '::strpbrk' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|97|error: '::strrchr' has not been declared|
z:\cpp programming\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.0\include\c++\cstring|98|error: '::strstr' has not been declared|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'int CEGUI::String::compare(const char*) const':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|968|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'int CEGUI::String::compare(CEGUI::String::size_type, CEGUI::String::size_type, const char*) const':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|997|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::assign(const CEGUI::String&, CEGUI::String::size_type, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|1294|error: 'memcpy' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::operator=(const char*)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|1502|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::assign(const char*)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|1520|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'void CEGUI::String::swap(CEGUI::String&)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|1583|error: 'memcpy' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::append(const CEGUI::String&, CEGUI::String::size_type, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|1638|error: 'memcpy' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::operator+=(const char*)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|1895|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::append(const char*)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|1913|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::insert(CEGUI::String::size_type, const CEGUI::String&, CEGUI::String::size_type, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2008|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2009|error: 'memcpy' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::insert(CEGUI::String::size_type, const string&, CEGUI::String::size_type, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2080|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::insert(CEGUI::String::size_type, const utf8*, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2156|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::insert(CEGUI::String::size_type, CEGUI::String::size_type, CEGUI::utf32)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2193|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::insert(CEGUI::String::size_type, const char*)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2291|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::insert(CEGUI::String::size_type, const char*, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2325|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::erase(CEGUI::String::size_type, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2413|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::size_type, CEGUI::String::size_type, const CEGUI::String&, CEGUI::String::size_type, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2593|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2595|error: 'memcpy' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::size_type, CEGUI::String::size_type, const string&, CEGUI::String::size_type, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2708|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::size_type, CEGUI::String::size_type, const utf8*, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2828|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::size_type, CEGUI::String::size_type, CEGUI::String::size_type, CEGUI::utf32)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2909|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::iterator, CEGUI::String::iterator, CEGUI::String::const_iterator, CEGUI::String::const_iterator)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2995|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h|2997|error: 'memcpy' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::size_type, CEGUI::String::size_type, const char*)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|3026|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::iterator, CEGUI::String::iterator, const char*)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|3053|error: 'strlen' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String& CEGUI::String::replace(CEGUI::String::size_type, CEGUI::String::size_type, const char*, CEGUI::String::size_type)':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|3095|error: 'memmove' was not declared in this scope|
..\CodeBlocks\MinGW\include\CEGUI\string.h||In member function 'CEGUI::String::size_type CEGUI::String::find(const char*, CEGUI::String::size_type) const':|
..\CodeBlocks\MinGW\include\CEGUI\string.h|3541|error: 'strlen' was not declared in this scope|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings (0 minutes, 22 seconds) ===|


I am using Code::Blocks with MinGW on Windows 7.

Also How would I buffer my inputs into a string? This is what I formulated from the Ogre3D Tutorial: http://www.ogre3d.org/tikiwiki/Basic+Tutorial+7 Along with add my own spice to it in an attempt to get what I need (Which is a string that tells the buffered keys)

Code: Select all

class CustomKeyListener: public OIS::KeyListener{
       using namespace OIS;
       public:
       std::string mString;
       CustomKeyListener(){mString="Blank";};
        bool keyPressed(const KeyEvent &arg){
            CEGUI::GUIContext& context = CEGUI::System::getSingleton().getDefaultGUIContext();
            context.injectKeyDown((CEGUI::Key::Scan)arg.key);
            context.injectChar((CEGUI::Key::Scan)arg.text);
            std::cout<<arg.text<<std::endl;
            return true;
        }
      bool keyReleased(const KeyEvent &arg){
            CEGUI::System::getSingleton().getDefaultGUIContext().injectKeyUp((CEGUI::Key::Scan)arg.key);
            return true;
      }
   };

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: Tons of errors when compiling CEGUI

Postby lucebac » Fri Sep 04, 2015 23:18

Did you include all necessary headers?

molma100
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 04, 2015 18:44

Re: Tons of errors when compiling CEGUI

Postby molma100 » Fri Sep 04, 2015 23:31

I have added:

Code: Select all

#include "CEGUI/CEGUI.h"
#include "CEGUI/RendererModules/Ogre/Renderer.h"
#include <cstring>


'cstring' is a solution to someone else's problem, but did not help me. What else do I need to add?

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: Tons of errors when compiling CEGUI

Postby lucebac » Fri Sep 04, 2015 23:48

You don't need <cstring>.

molma100
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 04, 2015 18:44

Re: Tons of errors when compiling CEGUI

Postby molma100 » Sat Sep 05, 2015 00:26

Even without, I still have all of the stated errors... It is odd how badly everything messes up just from adding the initialization lines...

lucebac
Just can't stay away
Just can't stay away
Posts: 193
Joined: Sat May 24, 2014 21:55

Re: Tons of errors when compiling CEGUI

Postby lucebac » Sat Sep 05, 2015 00:42

Compare to how it's done here.
Also: I hope you did notice that the tutorial you linked above aims on CEGUI 0.7.X - the current releases are from 0.8.X branch!

molma100
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 04, 2015 18:44

Re: Tons of errors when compiling CEGUI

Postby molma100 » Sat Sep 05, 2015 01:14

Okay, I figured I should start the addition from scratch.

After removing all the new code, even the includes, I still had the errors.
After removing the linkers, I still had the errors.
After attempting to edit back the header files to have <cstring>, I still had the errors.
ONLY after I removed the folders from the project's resources is when the errors went away.

Apparently something is wrong with the header files which caused an avalanche of issues, and when I expanded the limit of errors, I found that other files started exploding too.

Basically I made a huge mess when attempting to add in the library to my current project, and I gotta figure out a safer way to add it. Main issue is that I cannot properly build the library due to not having straightaway compatability with MinGW, and there are libraries that are moved a bit on my new system.

In the end I either gotta find a 100% proper working and updated guide, or I have to rebuild my entire environment over which could take up another entire day (when I almost never get that kind of time to work on this project) to build in replication of my current project...

I really just need a minimal way to make a string to hold my key inputs in real-time. That is all...

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Tons of errors when compiling CEGUI

Postby YaronCT » Sun Sep 06, 2015 09:06

As a side note, MinGW 4.7 is very old. I think you're better off with a newer one, e.g. u can install 5.2 through msys2.

molma100
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 04, 2015 18:44

Re: MINGW: Tons of errors when compiling CEGUI

Postby molma100 » Tue Sep 08, 2015 16:05

My MinGW is old because I have worked on this project over several years, and only a couple years ago I updated to MinGW 4.7 (Life has slowed the development down a ton) Regardless, There must be some form of process to make an open keyboard reader. For example: The standard C++ Language has 'std::cin' for reading input text from the keyboard. WIth this, the program pauses to read input from the keyboard and then continues the program when the input is accepted. How would I do this in real time either with or without CEGUI? The main thing I need out of this is how to get said text. The display of the text and what to do with it is already planned. I would assume I can hold this in a 'std::string' to be displayed later. BUT I need a way to get such input in real-time, not by 'std::cin' where the program pauses...

If I can find a way do take my inputs (just like how 'std::cin' does) but in real-time, and store it in a string for reading, then everything else should fall into place afterward. THIS is where I need help, even though almost all games have a way of doing this. This seems like a simple thing to do, but for some reason I am completely unable to search for a guide on just that thing. Instead I have to spend several days circling through errors over and again for a library that has WAY MORE than what I need.


Return to “Help”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests