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

Request: Win64 gcc compile target #100

Open
blacksqr opened this issue Dec 26, 2019 · 6 comments
Open

Request: Win64 gcc compile target #100

blacksqr opened this issue Dec 26, 2019 · 6 comments
Assignees

Comments

@blacksqr
Copy link

I'd like to compile tcllibc.dll for 64-bit Windows systems, but I can't because apparently critcl has no Win64 compile target for mingw gcc.

I can cross-compile a Win32 dll from Linux, or compile a Win32 dll from a 64-bit Win computer with mingw installed. But there's no Win64 option. I have not been able to figure out how to define a new target.

I tried the 64-bit tcllibc.dll from the Magigsplat distro, but it seems that a dll compiled with Visual Studio is incompatible with a tclsh executable cross-compiled with gcc.

@andreas-kupries
Copy link
Owner

andreas-kupries commented Jan 7, 2020

The target definitions are all found in the file lib/critcl/Config.

Everything about Windows starts at https://github.com/andreas-kupries/critcl/blob/master/lib/critcl/Config#L290

The initial stuff is code to handle some MSVC differences in options and libraries.
That is followed by the actual target definitions (MSVC) at https://github.com/andreas-kupries/critcl/blob/master/lib/critcl/Config#L350

The mingw stuff begins at https://github.com/andreas-kupries/critcl/blob/master/lib/critcl/Config#L386

For a win64 target we need a new block, lets name it mingw64. I suspect that it should be mostly a copy of mingw32 with only changes to the target name, and the compile and link definitions to ensure that the compiler/linker are in 64bit mode.

I hope that helps.

@andreas-kupries
Copy link
Owner

Oh, right. The common settings are the top, at line https://github.com/andreas-kupries/critcl/blob/master/lib/critcl/Config#L55
just after the documentation of the known keys to use in a target definition.

@andreas-kupries
Copy link
Owner

And the copy clause should simplify creating the win64 definition as a variant of win32. See docs at top, and the win64 MSVC target as example (it is a variant of win32 MSVC).

@andreas-kupries andreas-kupries self-assigned this Jan 7, 2020
@andreas-kupries
Copy link
Owner

@blacksqr Did this help you ?

@blacksqr
Copy link
Author

Thanks for the information... I haven't had time to revisit the issue, I poached a pre-compiled 64-bit tcllibc library file from the BAWT distribution.

If I have success in defining a new target, I'll post feedback/details.

@andreas-kupries
Copy link
Owner

Thank you. Note that I am gearing up towards making a 3.1.18 release, and I hope to get such a Win64 target in.

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