0

EDIT: NOT WORKING ON ANY IDE, SEEMS TO BE A GENERAL MISCONFIG

So hello guys. It's taking a bit longer to set my Ubuntu system to code with SFML and C++ than expected. This should be one of the last problems really.

So my C::B 13.12 install via apt-get on Ubuntu 14.04 will auto-complete all of my code perfectly, standard libs and personal .h files included. But it seems to be failing at auto-completing SFML. At least the .hpp files are found and C::B will give me some suggestions, like with any other .h files, but not the same thing happens with the classes and structs. To be concrete, this happens. Whenever I include the SFML files to a program, and try get code suggestions from the sf namespace, this happens.

As you can see, only some trivial types appear, not the SFML classes.

Sorry for that image, but on screen shot the suggestions close. The types suggested are Int16, Int32, Int64, Int8, and their Uint types.

So well, I can't really think of anything else to do. These are my Search paths for my GNU GCC Compiler on C::B.

enter image description here

enter image description here

Thanks a lot guys! Peace.

ChemiCalChems
  • 612
  • 12
  • 31
  • This is more of a problem with Codeblocks in general since its autocomplete stuff has always been dodgy for me as well. – Poriferous Feb 11 '15 at 19:06
  • @Poriferous I know, I have also heard installing a nightly build would help me, but I wanna see if there is something a bit user friendlier to do. On Windows, SFML code completion works out of the box, but here on Linux it seems to be failing... Going back to Windows is not an option by now. – ChemiCalChems Feb 11 '15 at 19:07
  • You could always use Qt Creator or Kdevelop. Both provide good support for auto-completion. WIth the latter you have to use CMake, and on the former qmake which is a Qt abstraction of CMake. – Poriferous Feb 11 '15 at 19:10
  • @Poriferous I'm working on a team, and well, we are all using C::B by now. Is there a way of me using the .cbp files on Kdevelop? – ChemiCalChems Feb 11 '15 at 19:12
  • No. Kdevelop uses its own format for reading projects. I'm also CodeBlocks 13.12 and SFML parses fine when I type sf::. I'm on Ubuntu 14.04. – Poriferous Feb 11 '15 at 19:21
  • @Poriferous Strange, it's not working on KDevelop either. – ChemiCalChems Feb 11 '15 at 19:22

2 Answers2

2

In Code::Blocks try right click on project — «Reparse this project». That helped me — maybe it'll help you too.

Arman Hayots
  • 2,459
  • 6
  • 29
  • 53
0

libsfml-dev reinstall was enough.

ChemiCalChems
  • 612
  • 12
  • 31