We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
I have a cc_binary rule with a single .cpp file and one data dependency. I have no means to tell the application where to find the data.
cc_binary( name = "test", srcs = [ "Test.cpp", ], data = ["//engine_test/images"], )
filegroup( name = "images", srcs = glob([ "*.png", ]), )
#include <fstream> int main() { std::fstream fs("engine_test/images/test.png"); // can't find the file // fs.fail() == true :( }
bazel info release
#3881 seems to be related, but I also tried to use ($location //engine_test/images) without success.
my current workaround to open the files is: std::fstream fs("../../../../../../engine_test/images/test.png");
std::fstream fs("../../../../../../engine_test/images/test.png");
The text was updated successfully, but these errors were encountered:
CC: @laszlocsomor Do you know why this doesn't work on Windows?
Sorry, something went wrong.
See https://groups.google.com/d/msg/bazel-discuss/Po8xN8dhWkI/sWPUYV9YBAAJ
No branches or pull requests
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem / feature request / question:
I have a cc_binary rule with a single .cpp file and one data dependency. I have no means to tell the application where to find the data.
If possible, provide a minimal example to reproduce the problem:
BUILD file in engine_test/demos directory relative to the WORKSPACE directory
BUILD file in engine_test/images directory. same deal
Test.cpp
Environment info
bazel info release
): release 0.5.4Have you found anything relevant by searching the web?
#3881 seems to be related, but I also tried to use ($location //engine_test/images) without success.
Anything else, information or logs or outputs that would be helpful?
my current workaround to open the files is:
std::fstream fs("../../../../../../engine_test/images/test.png");
The text was updated successfully, but these errors were encountered: