Closed joseph-montanez closed 6 years ago
Instead of setting the flag as -U__STRICT_ANSI__ you can uncheck the c++x11 flag and use this custom flag:
-std=gnu++11
I think CMake might already set this up but I have not tried its CodeBlocks support.
I tried it, and it says _MAX_PATH isn't declared. If I use PATH_MAX instead, then it says _fullpath isn't declared. I unchecked C++11 and put in the compiler flag.
I guess some questions then.
Are you you added
What version of CodeBlocks do you have?
What version of GCC do you have?
What version of Windows do you have?
As a note the file that defines _fullpath is defined a mingw header
I did lookup why this is an issue and its something Mingw32 is never going to fix. I've looked at mingw64 and it had "POSIX" to be undefined as a requirement. So you might want to also try:
-UPOSIX
Reference: https://github.com/Alexpux/mingw-w64/blob/master/mingw-w64-headers/crt/stdlib.h#L538
CB: 16.01 Windows: 8 MinGW: 4.9 (came with CB)
Did you clean your project first? Make sure to clean and then build.
Yup. Same error as before.
What was wrong with what I was using before? I didn't have any problems with it. Why do I need this realpath()
thing, anyway?
What was wrong with what I was using before? I didn't have any problems with it. Why do I need this realpath() thing, anyway?
Its support for relative paths. Before your runtime required the FULL path, which is really odd. I should be able to say something like "rte ../mygame.nut" and it should be able to look at my current working directory and load the script. Before it would require "rte /Users/josephmontanez/Documents/mygame.nut"
Maybe if we do a screenshare this would be quicker.
If you are on mingw32 you have access to fullpath. If you Codeblocks and built in mingw32, you need to add "-U__STRICT_ANSI__" to the compiler -> other compiler flags