• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

how2 compile .dll files under Linux (off topic)

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi everyone !
I know this is slightly off topic.
I'm developing an application involving native libraries, written in C, with JNI.
I'm using Linux for developing and everything is running as it should.
Just wondered if I can build .dll libraries under Linux as well, or maybe with Wine ?
I don't wanna install windows and visual c++ !
thanks guysngals,
dennis
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DLL is a windows specific format for a shared library. On unix based systems the extension is .so (for shared object).

There's an example here showing how to compile a .so using GCC.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh sorry, my question was a bit misleading..
I meant, can I create a dll library on Linux, for running my JNI application on Windows ? as far as I know, I can't get it to run under windows with a .so library and whatever i read about it, it always says i have to create the dll with Visual C++ under Windoze and that's what i'm trying to avoid.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm... what you're looking for is a cross-compiler. Basically the cross-compiler knows the kind of output it needs to produce for a platform, even though the compiler isn't running on that platform. I found these notes on using MinGW and Cygwin for windows cross-compiling on Linux. (Though I haven't done this myself...)

If you have access to a Windows machine, you don't have to use VC++... I've always used MinGW on windows. They even have an example of how to create a JNI DLL in their FAQ.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks so much for your tip - this is exactly what i was looking for !
respect
dennis
 
Run away! Run away! Here, take this tiny ad with you:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic