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

Windows build with forced x64 arch can not find any symbols and symbols check fails #28

Open
blacklion opened this issue Jan 14, 2022 · 0 comments

Comments

@blacklion
Copy link

I have gradle 7.3.3, and I have this definition of JNI library:

    // Sorry, ARM, I don't understand how to fix this
    platforms {
        x64 {
            architecture "x86_64"
        }
    }
    components {
        jniwrapper(JniNativeLibrarySpec) {
            // Default is 32 bit in 2022, crazy
            targetPlatform "x64"
            enableCheckTask true
            javaCompileTasks << compileJava
            sources {
                c {
                    source {
                        srcDirs 'src/main/native'
                        include '**/*.c'
                    }
                }
            }
        }
    }

I need to define platform, as by default gradle builds 32 bit DLL on 645 bit windows ith 64-bit-only JDK 17 (which is crazy, IMHO).

This config fails to find ANY symbols in resulting DLL. DLL is built successfully, no problems, and it is 64 bit, with proper symbols.

If I omit all this "platform" dance everything works, but resulting DLL is 32 bit one, which is, of course, unusable :-)

I have MSVC Community installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community.

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

1 participant