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 680379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:21:58+00:00 2026-05-14T01:21:58+00:00

Update: After some more reading I see that this problem is totally general, you

  • 0

Update: After some more reading I see that this problem is totally general, you can’t mix architectures in the same process, so 64 bit Java cannot dlopen() a 32 bit library like FMOD. Is there any possible workaround for this, keeping in mind I’m writing my own C interface to the FMOD library?

I need to make a 64-bit dylib on Max OS X because Java Native Access only likes 64-bit libraries on 64-bit machines. The problem is, my C source code dynamically includes FMOD which on Mac only provides 32-bit dylibs. When I try to compile without the -m32 option (since I must output a 64-bit dylib) I get the following error:

    gcc -dynamiclib -std=c99 -pedantic -Wall -O3 -fPIC -pthread -o  ../bin/libpenntotalrecall_fmod.dylib ../../src/libpenntotalrecall_fmod.c -lfmodex -L../../lib/osx/

    ld: warning: in /usr/lib/libfmodex.dylib, missing required architecture x86_64 in file
    Undefined symbols:
      "_FMOD_System_CreateSound", referenced from:
          _startPlayback in ccJnlwrd.o
      "_FMOD_Channel_GetPosition", referenced from:
          _streamPosition in ccJnlwrd.o
      "_FMOD_System_Create", referenced from:
          _startPlayback in ccJnlwrd.o
      "_FMOD_System_PlaySound", referenced from:
          _startPlayback in ccJnlwrd.o
      "_FMOD_Sound_Release", referenced from:
          _stopPlayback in ccJnlwrd.o
      "_FMOD_Channel_IsPlaying", referenced from:
          _playbackInProgress in ccJnlwrd.o
      "_FMOD_System_Update", referenced from:
          _streamPosition in ccJnlwrd.o
          _startPlayback in ccJnlwrd.o
      "_FMOD_Channel_SetPaused", referenced from:
          _startPlayback in ccJnlwrd.o
      "_FMOD_System_Release", referenced from:
          _stopPlayback in ccJnlwrd.o
      "_FMOD_System_Init", referenced from:
          _startPlayback in ccJnlwrd.o
      "_FMOD_Channel_SetVolume", referenced from:
          _startPlayback in ccJnlwrd.o
      "_FMOD_System_Close", referenced from:
          _stopPlayback in ccJnlwrd.o
      "_FMOD_Channel_SetCallback", referenced from:
          _startPlayback in ccJnlwrd.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [all] Error 1

Shouldn’t it be possible to get a 64 bit dylib from my source code that dynamically includes 32 bit libraries?!

  • 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-05-14T01:21:58+00:00Added an answer on May 14, 2026 at 1:21 am

    As you’ve noted, you can’t mix architectures in the same process.

    The workaround is then to have two processes. One of them is a 32 bit “helper” process that links to the 32-bit library and exposes its functions through some IPC mechanism, and the other is the 64-bit Java process linked to your own 64-bit library.

    Your 64-bit library starts up the helper process, and provides a set of functions that it implements by passing requests to the helper process over the IPC mechanism and returning the results. The IPC can be as simple as a pair of anonymous pipes created with the pipe() system call.

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

Sidebar

Related Questions

So the title is somewhat misleading... I'll keep this simple: I'm comparing these two
This requires a bit of background. I'm creating a web app (ASP.NET/VB.NET with SQL
I have a few JavaScript functions that all look similar to me. but behave
I have a C++ program that will read in data from a binary file
I am using some dell workstations(running WinXP Pro SP 2 & DeepFreeze) for development,
I am creating an app which has version for both iPhone and iPad, iPad
I have lloked at the Rich Faces jquery integration at the live demo exadel
I've been working on the next step of my continuous integration project, which is
I'm using NServiceBus in it's own process (so not using the Generic Host) and
I have a maven2 repository from which I'm trying to fetch an snapshot artifact

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.