Your title doesn't match your question at all or maybe you haven't really understood your problem. The autocompletion and class recognition doesn't really have anything to do with any library it's Visual Studio Intellisense that does all the trick.
You don't mention if it works with SFML only (without cplex), if not then you should maybe consider reinstalling VS (or at least google a bit into VS-only problem). If it works with SFML only, then make sure, that cplex doesn't use a namespace/global class/struct/function that is called
sf.
If nothing helps at all you can still turn intellisense of to get rid of the red underlining.