0

I have coding in IDE: Qt Creator 5.6 (Open source).

In my program, I have to read a .txt file due to run. This .txt file is located in my Build folder. The .txt path is: "./config/values/Login.txt".

When I run in Debug mode everything is fine. However, when I change to Release mode, my program compiles, run, and give me an error for not finding Login.txt.

Why, when building is done in release mode, my release build is empty?

Thanks in advance!

andseg
  • 658
  • 1
  • 9
  • 26
  • 1
    What IDE? What happens if you compile your application in release mode and then run it manually instead of clicking a button in your IDE? – HolyBlackCat Jun 30 '16 at 20:30
  • Please [edit] your post to add any additional information you have to your question. Avoid adding this in the comments, as they are harder to read and can be deleted easier. – Scott Weldon Jun 30 '16 at 20:35
  • ***Why, when building is done in release mode, my release build is empty?*** I would bet that the default folder in the release configuration is different so that when you use a relative path it is not found. Print the location of the current folder at the start of the program to debug. – drescherjm Jun 30 '16 at 21:04
  • Took to long to read this but indeed you are correct good sir. – andseg Jun 30 '16 at 21:11

1 Answers1

0

The reason is: I am stupid!

My early version of the project used to be located in C:/André/Qt/. Due to other problems I changed the name of the folder to Andre. Which means that when i ran the project in another mode (with default project settings), Qt created a folder called André again and saved the build in there.

After I changed the settings it worked just fine.

living and learning.

I apologize for taking everybody time with this amateur mistake.

andseg
  • 658
  • 1
  • 9
  • 26