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

Compilation under Windows 7 MinGW64/32 fails. #62

Closed
Art10001 opened this issue Oct 15, 2018 · 2 comments
Closed

Compilation under Windows 7 MinGW64/32 fails. #62

Art10001 opened this issue Oct 15, 2018 · 2 comments

Comments

@Art10001
Copy link

After a lot of tries, I finally got NP2Kai to almost compile. First, it complained that -lmingw32 was not found. I realized that the resulting executable would be 32 bits, so I installed the 32 bits toolchain version that you specify on the README.

However, I get the following issue:

"../sdl2/win32/main.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile21.win:67: np21kai] Error 1"

This is the text of sdl2/win32/main.c:

"/**

#include "compiler.h"
#include "np2.h"
#include "..\fontmng.h"

#pragma comment(lib, "SDL2.lib")
#pragma comment(lib, "SDL2main.lib")
#pragma comment(lib, "zlib.lib")

#if !defined(RESOURCE_US)
#pragma comment(lib, "SDL2_ttf.lib")
#endif

/**

  • ���C��

  • @param[in] argc �ø��

  • @param[in] argv �ø��

  • @return ���U���g �R�[�h
    */
    int main(int argc, char *argv[])
    {
    UINT nLength;
    TCHAR szFont[MAX_PATH];

    nLength = GetWindowsDirectory(szFont, SDL_arraysize(szFont));
    lstrcpy(szFont + nLength, TEXT("\Fonts\msgothic.ttc"));
    fontmng_setdeffontname(szFont);

    return np2_main(argc, argv);
    }"

What could be the issue?

Also, it's worth menctioning that during compilation, an error was obtained: in the sdl2/dosio.c file, in the 193th line, there's a bug, as mkdir() only accepts one instruction. You can fix this by transforming it into _mkdir.

Thank you for your help!

@AZO234
Copy link
Owner

AZO234 commented Oct 15, 2018

I tuned SDL2 build on Windows(MSYS2 64bit's 32bit console).

It needs installing 'mingw-w64-i686-SDL2' etc and 'mingw-w64-i686-gcc' packages.
I fixed README.

Sorry to your inconvenience.

@Art10001
Copy link
Author

After many months, I realized that I had forgotten to comment here.

Well, I had compiled NP2Kai, and it worked, but I dislike the SDL2 GUI and find it lacking in features the X11 port has.

Sorry for leaving this issue open for so long!

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