Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ not usable with clib2 #59

Open
Mooseart opened this issue Oct 19, 2016 · 1 comment
Open

C++ not usable with clib2 #59

Mooseart opened this issue Oct 19, 2016 · 1 comment

Comments

@Mooseart
Copy link

Mooseart commented Oct 19, 2016

I've tried to use the new -mcrt=clib2 switch. Unfortunately I'm getting this really weird compile error in file new. Problem is a lot of the standard includes use it so it is very easily triggered. Here's an example:

#include <algorithm>
int main(int argc, char** argv) {
    return 0;
}
In file included from /usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/new.h:6,
                 from /usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/g++/stl_algobase.h:52,
                 from /usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/g++/algorithm:30,
                 from /home/mooseart/Documents/Projects/referenz/Test2/main.cpp:1:
/usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/new:28: `operator new' takes type `size_t' as first parameter
/usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/new:29: `operator new' takes type `size_t' as first parameter
/usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/new:32: `operator new' takes type `size_t' as first parameter
/usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/new:33: `operator new' takes type `size_t' as first parameter
/usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/new:38: `operator new' takes type `size_t' as first parameter
/usr/local/m68k-amigaos/lib/gcc-lib/m68k-amigaos/2.95.3/include/new:39: `operator new' takes type `size_t' as first parameter
@cahirwpz
Copy link
Member

cahirwpz commented Oct 19, 2016

C++ and -mcrt=clib2 is not supported for now. Please use libnix instead.

EDIT: Is there any particular reason why you'd like to use C++ with clib2?

@cahirwpz cahirwpz changed the title Using clib2 generates compile error from #include <new> C++ not usable with clib2 Oct 19, 2016
@cahirwpz cahirwpz added the bug label Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants