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

Compiling error with chm_lib.c #34

Open
chqzeng opened this issue Apr 14, 2024 · 1 comment
Open

Compiling error with chm_lib.c #34

chqzeng opened this issue Apr 14, 2024 · 1 comment

Comments

@chqzeng
Copy link

chqzeng commented Apr 14, 2024

Hello thank you for this great project! I am very new to compiling projects with make. I try to build this project on my macbook with Apple A2 chip, macos: 14.2.1 (23C71).
I tried to installed the prerequest

  • wxWidgets from source make and install
  • chmlib : brew install chmlib

but when I try to compile this xchm project , it failed with following error:.

1. ./configure , with error

checking for chm_lib.h... no
configure: error: Can't find the CHMLIB header.

2. ./configure --enable-builtin-chmlib && make, with following error:

gcc -DHAVE_CONFIG_H -I. -I..  -I../art -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.2 -I/usr/local/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -g -O2  -MT chm_lib.o -MD -MP -MF .deps/chm_lib.Tpo -c -o chm_lib.o chm_lib.c
chm_lib.c:179:2: error: "Please define the sized types for your platform in chm_lib.c"
#error "Please define the sized types for your platform in chm_lib.c"
 ^
chm_lib.c:185:9: warning: 'memcpy' macro redefined [-Wmacro-redefined]
#define memcpy __builtin_memcpy
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_string.h:62:9: note: previous definition is here
#define memcpy(dest, ...) \
        ^
chm_lib.c:260:29: error: unknown type name 'Int32'
                            Int32 *dest)
                            ^
chm_lib.c:272:30: error: unknown type name 'UInt32'
                             UInt32 *dest)
                             ^
chm_lib.c:284:29: error: unknown type name 'Int64'
                            Int64 *dest)
                            ^
chm_lib.c:286:5: error: use of undeclared identifier 'Int64'
    Int64 temp;
    ^
chm_lib.c:290:5: error: use of undeclared identifier 'temp'
    temp=0;
    ^
chm_lib.c:293:9: error: use of undeclared identifier 'temp'
        temp <<= 8;
        ^
chm_lib.c:294:9: error: use of undeclared identifier 'temp'
        temp |= (*pData)[i-1];
        ^
chm_lib.c:296:13: error: use of undeclared identifier 'temp'; did you mean 'bcmp'?
    *dest = temp;
            ^~~~

3. I tried to modified the above error file src/chm_lib.c

remove the two blocks of data type definition for 32bit machines. the make and make install can work, but the program xchm has no repsonse.

any clue?

thanks,
CZ

@rzvncj
Copy link
Owner

rzvncj commented Apr 14, 2024

It's been a while since I've had access to a macOS machine, but I do know that the MacPorts build is supposed to work: https://ports.macports.org/port/xchm/

Maybe check out what they do there and adapt the steps for the latest version of xCHM?

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