Skip to content

Works with 64-bit Windows (without pkg-config) but doesn't work with 32-bit Windows. #27

Closed
@stever

Description

@stever

Hello. I've been having trouble with getting this to work on Windows using 32-bit and then found that it works on 64-bit Windows even without pkg-config (which incidentally I had got installed though I'm not sure that could help after all). Having learned more about the current head revision I understand that it works without pkg-config on Windows however I could not get it to work with 32-bit Windows and I get a stream of error messages like "__divdi3: not defined". My understanding of C and cgo is patchy and I'm not sure what this means. I couldn't see why it should be different on 32-bit Windows but perhaps some other compiler option is required.

I resolved my problems by discarding pkg-config and the static compilation on Windows and use the DLL instead, which is what other platforms are using anyway. So instead of the #cgo pkg-config line I'm using "#cgo LDFLAGS: -lsqlite3" having the environment set up with the include files on the path for gcc (LIBRARY_PATH and C_INCLUDE_PATH). The little work with cgo that I've done so far this works best with the smallest of changes to the source-code across platforms.

I've never used pkg-config before and while I had no trouble with it on other platforms on Windows it was a struggle getting an environment set up. Wouldn't this be better without pkg-config?

In any case the current head revision doesn't appear to work for 32-bit Windows and the static compilation as an exception for Windows seems unnecessarily complicated. Maybe you can get it to work but I wonder if this is the wrong direction to go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions