Reputation: 401
I just started using QTCreator IDE on Linux, and I love everything about it except I ran into an issue with file IO. This doesn't concern the QT library, just the IDE and C++. The issue is that I have to specify the full path name for a file - like so:
Shader shader ("/home/user/Documents/OpenGL/SandboxProject/vertexShader.glsl")
In contrast, on CodeBlocks I can just do the current directory:
Shader shader ("./vertexShader.glsl")
Do I need to configure something in the IDE? I noticed that when I type in the terminal which qtcreator
it is in /usr/bin/
whereas my CodeBlocks binary is in /usr/local/bin/
Upvotes: 0
Views: 75
Reputation: 11418
Go to Projects
-> Select your project tab -> Select the Run
tab -> Check the Run
section and set the Working directory
as you need it.
If you are developing a cross-platform Qt app, I'd recommend to use the Qt Resource System, which compiles resource files into your binary.
Upvotes: 2