YouCompleteMe is not finding some (but not all) SDL functions and also not finding std::string
up vote
0
down vote
favorite
So I'm trying to edit a C++ file which uses SDL. I've included the SDL header:
#include <SDL2/SDL.h>
and the file compiles fine. This is all on my MacOS machine. However, when I enter vim, YCM claims that some (but not all) SDL type names are "unknown." Specifically, it can't seem to find the following:
SDL_Surface
SDL_Window
SDL_WINDOWPOS_UNDEFINED
SDL_WINDOWPOS_SHOWN
It also can't seem to find std::string
(yes, I included <string>
).
On my Ubuntu machine, using the same .ycm_extra_conf.py
file as on my Mac machine, I don't run into these issues at all.
Here are the flags
from my .ycm_extra_conf.py file:
flags = [
'-Wno-unused-variable',
'-Wall',
'-lSDL2',
'-x',
'c++',
'-std=c++11',
'-stdlib=libc++',
]
Also, this may be relevant: when I try compiling the program with clang
with exactly these flags, I get a linker error, but when I compile with clang++
, it compiles just fine.
c++ macos vim sdl youcompleteme
add a comment |
up vote
0
down vote
favorite
So I'm trying to edit a C++ file which uses SDL. I've included the SDL header:
#include <SDL2/SDL.h>
and the file compiles fine. This is all on my MacOS machine. However, when I enter vim, YCM claims that some (but not all) SDL type names are "unknown." Specifically, it can't seem to find the following:
SDL_Surface
SDL_Window
SDL_WINDOWPOS_UNDEFINED
SDL_WINDOWPOS_SHOWN
It also can't seem to find std::string
(yes, I included <string>
).
On my Ubuntu machine, using the same .ycm_extra_conf.py
file as on my Mac machine, I don't run into these issues at all.
Here are the flags
from my .ycm_extra_conf.py file:
flags = [
'-Wno-unused-variable',
'-Wall',
'-lSDL2',
'-x',
'c++',
'-std=c++11',
'-stdlib=libc++',
]
Also, this may be relevant: when I try compiling the program with clang
with exactly these flags, I get a linker error, but when I compile with clang++
, it compiles just fine.
c++ macos vim sdl youcompleteme
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
So I'm trying to edit a C++ file which uses SDL. I've included the SDL header:
#include <SDL2/SDL.h>
and the file compiles fine. This is all on my MacOS machine. However, when I enter vim, YCM claims that some (but not all) SDL type names are "unknown." Specifically, it can't seem to find the following:
SDL_Surface
SDL_Window
SDL_WINDOWPOS_UNDEFINED
SDL_WINDOWPOS_SHOWN
It also can't seem to find std::string
(yes, I included <string>
).
On my Ubuntu machine, using the same .ycm_extra_conf.py
file as on my Mac machine, I don't run into these issues at all.
Here are the flags
from my .ycm_extra_conf.py file:
flags = [
'-Wno-unused-variable',
'-Wall',
'-lSDL2',
'-x',
'c++',
'-std=c++11',
'-stdlib=libc++',
]
Also, this may be relevant: when I try compiling the program with clang
with exactly these flags, I get a linker error, but when I compile with clang++
, it compiles just fine.
c++ macos vim sdl youcompleteme
So I'm trying to edit a C++ file which uses SDL. I've included the SDL header:
#include <SDL2/SDL.h>
and the file compiles fine. This is all on my MacOS machine. However, when I enter vim, YCM claims that some (but not all) SDL type names are "unknown." Specifically, it can't seem to find the following:
SDL_Surface
SDL_Window
SDL_WINDOWPOS_UNDEFINED
SDL_WINDOWPOS_SHOWN
It also can't seem to find std::string
(yes, I included <string>
).
On my Ubuntu machine, using the same .ycm_extra_conf.py
file as on my Mac machine, I don't run into these issues at all.
Here are the flags
from my .ycm_extra_conf.py file:
flags = [
'-Wno-unused-variable',
'-Wall',
'-lSDL2',
'-x',
'c++',
'-std=c++11',
'-stdlib=libc++',
]
Also, this may be relevant: when I try compiling the program with clang
with exactly these flags, I get a linker error, but when I compile with clang++
, it compiles just fine.
c++ macos vim sdl youcompleteme
c++ macos vim sdl youcompleteme
edited Nov 5 at 3:31
asked Nov 5 at 3:26
ubadub
1,931820
1,931820
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147918%2fyoucompleteme-is-not-finding-some-but-not-all-sdl-functions-and-also-not-findi%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password