Do I need any extensions/programs to build ctrulib using the Windows CMD? Because I am getting an Error 127 and command not found when I run make clean and make. Any Ideas how I can get this working?
I don't think make works at all with cmd, you have to run it in MSYS.Do I need any extensions/programs to build ctrulib using the Windows CMD? Because I am getting an Error 127 and command not found when I run make clean and make. Any Ideas how I can get this working?
So I have ordered Cubic Ninja today, now to wait until I get it and then patch my 9.2 E 3DS.
Since I know quite some c++ I wanted to make homebrew games. After having a quick read through a few pages..
What do we have to use as in libraries?
Do we need to use raw memory to edit the framebuffer?
Is there a 2D/3D engine to work with?
if there is, Is it nice to work with or complicated?
Can we access networking code? ( for a multiplayer game?)
I saw CTRULib or something like that?
is there a nice overview page for it? (Documentation anything?)
Code:string data; sprintf( const_cast<char*>(data.c_str()), "%s",b) ; //Places the content of the buffer inside "data"
I convert the string to a char[] that works with sprintf, any less hacky way you know?n**** you what
I convert the string to a char[] that works with sprintf, any less hacky way you know?
size_t maxContentLength = 1377; // whatever
char* content = (char*) malloc(maxContentLength + 1);
size_t amountReceived = ReceiveData(content, maxContentLength);
content[amountReceived] = 0;
std::string s(content);
free(content);
I actually copied the code and totally missed the const part, will look into it nowc_str() works for getting data out of std::string, but definitely not the other way around. The fact that you had to use const_cast should be a huge hint that something is wrong.
The code should go something like this:
Code:size_t maxContentLength = 1377; // whatever char* content = (char*) malloc(maxContentLength + 1); size_t amountReceived = ReceiveData(content, maxContentLength); content[amountReceived] = 0; std::string s(content); free(content);
There is probably a simpler way to do this (allocating directly in the std::string), but I'm not that familiar with the STL.
you cant convert u8* char* (almost have no idea how char works as I use string for everything string related, I mean who the heck uses char )c_str() works for getting data out of std::string, but definitely not the other way around. The fact that you had to use const_cast should be a huge hint that something is wrong.
The code should go something like this:
Code:size_t maxContentLength = 1377; // whatever char* content = (char*) malloc(maxContentLength + 1); size_t amountReceived = ReceiveData(content, maxContentLength); content[amountReceived] = 0; std::string s(content); free(content);
There is probably a simpler way to do this (allocating directly in the std::string), but I'm not that familiar with the STL.
you cant convert u8* char* (almost have no idea how char works as I use string for everything string related, I mean who the heck uses char )
Right?
Yeah but the function wants a u8 so I have no choice. And I'm not going near chars ever again. String is everything I need. FUCK chars.For the purpose of storing ASCII strings, those two are technically interchangeable, but you should use char for CHARacter data (e.g. text) and u8 for binary data.
You sound like a Javababy Homebrew is for serious programmers onlyYeah but the function wants a u8 so I have no choice. And I'm not going near chars ever again. String is everything I need. FUCK chars.
Um no.. I use C# as my main language btw, I don't have these problems on the WiiYou sound like a Javababy Homebrew is for serious programmers only
I tried using the cmd (as said on 3dbrew) and from msys (that batch, that opens a terminal window should be right, I guess?)
Sorry for all my questions but I have never done something like that before, I am used to Visual Studio and clicking a button to compile^^