-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
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
glog package doesn't seem to work. ( mingw-w64-x86_64-glog 0.3.4.4d391fe-3 ) #960
Comments
I believe this can be closed due to no response |
I haven't been in the position to try this, I switched over to developing on Linux. However, not even the simplest program linking to glog would work, with the mentioned mingw-w64-glog package. I am not sure how wise it is to close this issue?? |
I think you should include here what and how would you like to link to glog, and what is the exact error/symptom you have, which MSYS shell you are using etc. Without that nobody can help you. |
Hi! I can confirm this is not working. Very simple example: #include <glog/logging.h>
int main(int argc, char const *argv[]) {
google::InitGoogleLogging(argv[0]);
LOG(INFO) << "Hi";
return 0;
} At runtime a popup displays this message
I have a fresh install of MSYS2 with some libraries working like a charm (sqlite3, yaml-cpp). Can I do anything to get glog working? glog version is mingw-w64-x86_64-glog-0.3.5-1. Thanks for your work! This system solves all my problem with the Windows machine at office :D . |
It does work. If you build the package yourself, you can check the test applications (demangle_unittest.exe logging_unittest.exe stl_logging_unittest.exe utilities_unittest.exe) built and properly executed:
When you wrote:
Do you mean by double clicking on the built executable from the file explorer? Pls read the wiki to understand that either:
|
Hi, thanks for your answer.
No, it is only because a popup is displayed. I launch the app using conEmu. I have set the PATH variable properly, I think. If I launch the app using the Mingw64 environment, it does nothing
I can see that Thanks for your help! |
Your executable has a name Whether you run your program from conemu of from Windows explore, does not very different. The problem is those environments do not know where to locate the dependent dll.s Let's try first to make sure the compiled executable is working first from within the MINGW64 shell
|
Having this code #include <iostream>
#include <glog/logging.h>
int main(int argc, char const *argv[]) {
google::InitGoogleLogging(argv[0]);
LOG(INFO) << "Hi Log";
std::cout << "Hi stdout" << std::endl;
return 0;
}
Compiling with
Checking
Thank you! |
@analca3 your PATH and your test code is OK. I have submitted a PR which is fixing this. With that fix I was able to make the above code work.
When Alexpux uploads the new version you can try it out. |
Thank you for the support! I will try again when the PR merges. |
@analca3 the package has been uploaded to the repo |
Thank you! It works like a charm now 🥇 |
Hello,
I've installed the 64 bit version of mingw/msys2 on 2 seperate devices.
While I can succesfully make use of many libraries,I cannot get even the simplest code (i.e. just calling the init function) to work with the supplied 64 bit shared library for glog. It compiles fine, but will not run.
As soon as the DLL is loaded, an access violation occurs in libglog.dll. I suspect there is something wrong with the binary version of the library; it cannot seem to be loaded. I checked with Dependency Checker, and have verified that a crash occurs loading the glog DLL. The DLL architecture itself is 64 bit as it should be.
On a side note, and not something msys2 can fix, static linking of glog also seems a no-go as this leads to multiple definition errors, pertaining to the fact that glog itself uses, and has its own definition for stack unwinding.
The text was updated successfully, but these errors were encountered: