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

Library is built wrong on OSX #7

Closed
carlor opened this issue Apr 9, 2012 · 2 comments
Closed

Library is built wrong on OSX #7

carlor opened this issue Apr 9, 2012 · 2 comments

Comments

@carlor
Copy link

carlor commented Apr 9, 2012

Building a file which shows Hello World (hiworld.d) in Mac OS 10.7:

$ dmd hiworld.d -I'libX11' libX11/lib/libDX11-dmd.a 
ld: warning: ignoring file libX11/lib/libDX11-dmd.a, file was built for archive which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
  "_XCloseDisplay", referenced from:
      __Dmain in hiworld.o
  "_XMapWindow", referenced from:
      __Dmain in hiworld.o
  "_D6deimos3X114Xlib6XEvent6__initZ", referenced from:
      __Dmain in hiworld.o
  "_XOpenDisplay", referenced from:
      __Dmain in hiworld.o
  "_RootWindow", referenced from:
      __Dmain in hiworld.o
  "_XDrawString", referenced from:
      __Dmain in hiworld.o
  "_DefaultScreen", referenced from:
      __Dmain in hiworld.o
  "_BlackPixel", referenced from:
      __Dmain in hiworld.o
  "_DefaultGC", referenced from:
      __Dmain in hiworld.o
  "_WhitePixel", referenced from:
      __Dmain in hiworld.o
  "_XFillRectangle", referenced from:
      __Dmain in hiworld.o
  "_XCreateSimpleWindow", referenced from:
      __Dmain in hiworld.o
--- errorlevel 1
  "_XSelectInput", referenced from:
      __Dmain in hiworld.o
  "_XNextEvent", referenced from:
      __Dmain in hiworld.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
@MartinNowak
Copy link
Contributor

You need to link against libX11 too (-L-lX11).

@CyberShadow
Copy link
Member

I'm guessing this is now solved or no longer relevant, thus closing, but let me know if this should be reopened.

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

3 participants