Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8315897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:14:03+00:00 2026-06-08T21:14:03+00:00

I want to build a JNI DLL using Eclipse and Cygwin. I know there

  • 0

I want to build a JNI DLL using Eclipse and Cygwin. I know there are a lot of examples out there, but non of them work for me. I’ve spent 2 days on this and I still can’t get Eclipse to build a frickin dll properly.

I can build this Windows dll in Visual studio with JNI code fine. But my main IDE is Eclipse and I want the code in one place, one project. When I compile this in Eclipse I’ll get a dll out of it but the Java VM crashes at the loading of the library, with no error telling me whats wrong. So I’m thinking its the way I linked this…Here is how VS2008 does the compile and link I am showing the command line for VS:

compile and linking for dll using visual studio

/Od /I "C:\a_Mine\siglib\include" /I "C:\Program Files (x86)\Java\jdk1.6.0_25\include
\win32" /I "C:\Program Files (x86)\Java\jdk1.6.0_25\include" /I "..\..\include" /D 
"_CRT_SECURE_NO_WARNINGS" /D "SIGLIB_DLL_SOURCE=1" /D "_VC80_UPGRADE=0x0600" /D 
"_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Fp".\Debug/dynamic_library.pch" 
/Fo".\Debug/" /Fd".\Debug/" /W3 /nologo /c /ZI /TP /errorReport:prompt

Linker MS command line

/OUT:"Debug/siglib.dll" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Program Files (x86)\Java\jdk1.6.0_25\lib" 
/DLL /MANIFEST /MANIFESTFILE:".\Debug\siglib.dll.intermediate.manifest" 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:".\Debug/siglib.pdb" 
/DYNAMICBASE:NO /IMPLIB:".\Debug/siglib.lib" /MACHINE:X86 /ERRORREPORT:PROMPT 
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib 
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

and here is my linker for the Eclipse Java – C/C+ project.

g++ -L"C:\Program Files (x86)\Java\jdk1.6.0_25\lib" -L"C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Lib\x64" -shared -o "myjni.dll" $(OBJS) $(USER_OBJS)  -lkernel32 
-luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 
-luuid -lodbc32 -lodbccp32 -ljvm

So how do I get this to link or compile right using Eclipse Cygwin?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:14:04+00:00Added an answer on June 8, 2026 at 9:14 pm

    You should update your eclipse to the latest and get ADT ver20. This removes cygwin from the build and all the custom scripts you may need to compile a windows dll.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want build a blog using jekyll and octopress. but an error happened when
I want to build a console-like output using JTextPane. Therefore I am using a
I was writing some native code on Android using NDK(jni). I want to turn
I want to build an local iPhone project without source control using jenkins. However
I want to build an app that renders events into it's UI but I
I want to build a web-based irc client with JQuery. I know I need
I want to build an iPhone app, it's a simple concept. You know those
i want build a photography app with effects . e.g. old images with brown
I want build a sketch pad app on iPhone, I assume that this type
i want to build a screen for user to get his marks on competitions,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.