Skip to content
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

Errors when building on Windows with GCC (MSYS2). #110

Open
ajh123 opened this issue Apr 8, 2023 · 4 comments
Open

Errors when building on Windows with GCC (MSYS2). #110

ajh123 opened this issue Apr 8, 2023 · 4 comments

Comments

@ajh123
Copy link

ajh123 commented Apr 8, 2023

Describe the bug
This bug is very specific to my use case, but could be helpful for others.
My program does not build successfully, when I run cmake --build build, millions of errors are produced.

To Reproduce
Steps to reproduce the behavior:

  1. Use Zep v0.1.12 (or the latest "master")
  2. Use MSys2 on Windows.
  3. Have a CMake project (like mine)
  4. Make sure all dependences are installed (e.g. CMake, GCC, ...)
  5. Prepare the CMake files cmake -B build
  6. Try to build the program cmake --build build
  7. See error

Expected behavior
Program builds successfully, and able to be ran.

Screenshots
I don't think a screenshot would be best for a wall (more like a skyscraper) of errors, so I have a pastebin instead.

Desktop (please complete the following information):

  • OS: Windows
  • Version 10

Additional context
Just started to use Zep to allow people to edit their Lua scripts in my game engine editor.

Some important files

I assume my compiler doesn't understand the following lines, because it is in the errors.

#ifdef WIN32
// A reference to the debug API on windows, to help the logger output in VC. This is better
// than out to the console sometimes, and as long as you are building on Windows, you are referencing the necessary
// kernel32.dll....
extern "C" {
__declspec(dllimport) void __stdcall OutputDebugStringA(_In_opt_ const char* pszChar);
}
#endif

Some possible solutions

  1. Could we have an option to disable using the Windows Debug API? (probably just another #ifdef ... #endif). Probably the most simplest to implement.
  2. Allow the program implementing Zep to handle the logs in its own way. (probably some kind of call-back) Would be useful for me because I have my own Logger, but probably the hardest implement.
@ajh123 ajh123 changed the title Errors when building on Windows with GCC. Errors when building on Windows with GCC (MSYS2). Apr 8, 2023
@cmaughan
Copy link
Collaborator

cmaughan commented Apr 9, 2023

Hi; sorry for the delay, it is a holiday weekend here. Obviously I haven't tried building with MSYS, but I'm not opposed to making it work! It sounds like you are on the case. Just #ifdef out the log on MSYS builds will do the job; the log is only for debugging. It might be nice to add an MSYS path to the CI Action at some point too...

@ajh123
Copy link
Author

ajh123 commented Apr 9, 2023

Hi; sorry for the delay, it is a holiday weekend here. Obviously I haven't tried building with MSYS, but I'm not opposed to making it work! It sounds like you are on the case. Just #ifdef out the log on MSYS builds will do the job; the log is only for debugging. It might be nice to add an MSYS path to the CI Action at some point too...

@cmaughan Thanks for seeing my problem.

Also errors are produced in other places, but I can't seem to find a fix for them.

@cmaughan
Copy link
Collaborator

I will try to get some time over the next week or so to do an MSYS build.

@ajh123
Copy link
Author

ajh123 commented Apr 12, 2023

I will try to get some time over the next week or so to do an MSYS build.

@cmaughan Thanks. For more info I use the following MSYS packages pacman -S base-devel mingw-w64-x86_64-{cmake,gcc,freeglut,glew,libpng,mesa} using the MINGW64 version of MSYS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants