Open MBeijer opened 2 years ago
How did you build the compiler? Are you cross compiling or building natively? What happens if you use -mcrt=clib2
instead?
Are you using using namespace std;
/ std::strcasecmp
btw?
@sodero no, I'm not using using namespace std;
nor std::strcasecmp
but I tried using that now and I get this error instead:
error: ‘strcasecmp’ is not a member of ‘std’; did you mean ‘strcasecmp’?
:sweat_smile:
@MBeijer Does this work for you?
Sorry about the weird way of showing example code. I have networking issues in my Amiga cave.
I'm cross compiling from Linux. Will do some tests with your example code and get back to you with the results.
Message ID: @.***>
Strange, with that test code it worked fine with -athread=native -mcrt=newlib
and -athread=single -mcrt=clib2
It's really strange that the code I compile to get the error has the same
includes + -athread=native -mcrt=newlib
.
The same code compiles just fine with both the MorphOS cross toolchain and
Bebbo's m68k toolchain without issue.
Message ID: @.***>
In case you were building with -std=c++11 (or later), try -std=gnu++11. In newlib, strcasecmp and some other functions are not available if __STRICT_ANSI__ is defined.
I have seen similar problem when building MilkyTracker. First I tried -U__STRICT_ANSI__ which works around it, but gnu++11 is probably a cleaner solution.
Ah, okay, this was probably when trying to compile MilkyTracker... Can't remember.
Message ID: @.***>
Hi!
I'm having trouble compiling a program since I updated to GCC 10, where I get the error
even though I have these includes:
or these:
with
-mcrt=newlib
I looked at the newlib includes and they seem to define the function, so it seems like it's not loading the proper includes from newlib for some reason.
I hope someone can help out with this!