1 Attachment(s)
Creator does not use CPATH/C_INCLUDE_PATH for code parsing
Hello!
I'm using QtCreator as code editor. I added the following new env variables to project settings:
Code:
CPATH = /home/alex/Сервер/Dropbox/Projects/Smilodon2/bin/
C_INCLUDE_PATH = /home/alex/Сервер/Dropbox/Projects/Smilodon2/bin/
LD_LIBRARY_PATH = /home/alex/Сервер/Dropbox/Projects/Smilodon2/bin/
Everything compiles and works well. But the QtCreator isn't able to find my header files and highlights "unknown" types as errors:
Attachment 12234
This file exists (the compiler also can see it):
Code:
alex@laptop:~$ ls -l /home/alex/Сервер/Dropbox/Projects/Smilodon2/bin/
итого 50
drwxrwx--- 1 alex alex 4096 ноÑб. 30 16:37 libsmilo
-rwxrwx--- 1 alex alex 10493 ноÑб. 30 16:37 libsmilo.h
lrwxrwxrwx 1 alex alex 50 ноÑб. 30 16:37 libsmilo.so -> libsmilo.so.0.15.9368
lrwxrwxrwx 1 alex alex 50 ноÑб. 30 16:37 libsmilo.so.0 -> libsmilo.so.0.15.9368
lrwxrwxrwx 1 alex alex 50 ноÑб. 30 16:37 libsmilo.so.0.15 -> libsmilo.so.0.15.9368
-rwxrwx--- 1 alex alex 31385 ноÑб. 30 16:37 libsmilo.so.0.15.9368
drwxrwx--- 1 alex alex 0 ноÑб. 30 16:37 tests
How can I ask QtCreator to follow CPATH/C_INCLUDE_PATH correctly? I *need* to use <..> brackets as my project will be installed as library. But for tests I need to deploy it locally.
UPDATED:
I have found that I can make it to see includes right if I start it with CPATH set variable:
Code:
alex@laptop:~$ CPATH=/home/alex/Сервер/Dropbox/Projects/Smilodon2/bin /opt/Qt/Tools/QtCreator/bin/qtcreator
So, looks like the problem is that the creator ignores CPATH in project settings when parsing the code.
Re: Creator does not use CPATH/C_INCLUDE_PATH for code parsing
What makes you think that creator should use random environment variables to feed it's code model?
Just use a supported build system and set that up to use the proper include paths and creator will use those settings. Or if you have to use a generic project, put the include paths into the expected file.