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

error: ‘uint_farptr_t’ was not declared in this scope #5

Open
briceparent opened this issue Dec 30, 2013 · 8 comments
Open

error: ‘uint_farptr_t’ was not declared in this scope #5

briceparent opened this issue Dec 30, 2013 · 8 comments

Comments

@briceparent
Copy link

Hello!
After installing Code blocks 13.12 on a fresh ubuntu install (13.10), and making the changes for CodeBlocks-Arduino (and installing build-essentials and libc6-dev-i386 as I'm running a 64bits system), I've created a new test project using the same settings as the ones founds in the Arduino IDE (which works fine) : serial port, programmer, arduino type.
After that, when I try to compile, i'm getting the following compilation errors :
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/pgmspace.h:1067:26: error: ‘uint_farptr_t’ was not declared in this scope
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/pgmspace.h:1068:27: error: ‘uint_farptr_t’ was not declared in this scope
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/pgmspace.h:1068:53: error: expected primary-expression before ‘len’
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/pgmspace.h:1068:58: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/pgmspace.h:1069:37: error: ‘uint_farptr_t’ has not been declared (repeated many times)
Is this a bug or did I do something wrong?

Thanks for our time!

@obfuscated
Copy link

This happens to me when I have -I/usr/include passed to the compiler. For some reason the Gcc-AVR compiler has /usr/include and /usr/lib in the search paths. Probably it is some bug in the C::B compiler template.

p.s. I'm posting this as a reference for a solution the next time I hit this problem :)

@gregoryfenton
Copy link

edit default.conf, search for "/usr/include".
Around line 2025 (it reads , remove
usr/include;

Hope that helps.

Greg

@sindrehan
Copy link

I'm sorry for bumping an old thread, but I'm having the same issue and Gregs fix isn't working for me. I've searched for "/usr/include" in default.conf and its only there in two places. Both of those seem to be correct, and none of them are near line 2025 (1465 and 1511).

@obfuscated
Copy link

sindrehan: These settings can be found in
Settings -> Compiler -> GCC AVR -> Search directories -> Compiler
and
Settings -> Compiler -> GCC AVR -> Search directories -> Linker

Editing default.conf is not really recommended.

@sindrehan
Copy link

I'm assumin you mean to remove /usr/include and /usr/lib. I went ahead and did that, and it removed the errors. However, when I now try to compile I get the error included in the following pastebin. I'm at my wits' end here, so I'm hoping you can help me with this as well.

@obfuscated
Copy link

Hm don't know. I don't have prog_char mentioned in Print.cpp in my arduino install.

@sindrehan
Copy link

Ok, so I followed the post on this page, and that solved most of it. Now I'm only getting a warning, BUT it compiles and transfers to the arduino.

@JohnRyk
Copy link

JohnRyk commented Oct 2, 2018

remove MinGW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants