Dragonfly Q&A

Error opening object files

0 like 0 dislike
I get this error when i try to run my game: "error while loading shared libraries: ?: cannot open shared object file: No such file or directory"

I haven't put in any game code yet, just the basic game manager part into game.cpp.

I'm working in Eclipse with Cygwin.
asked Sep 1, 2014 in Tutorial by lrodonnell

2 Answers

0 like 0 dislike
Have you changed the file name under ENG in the makefile to the corresponding library for Cygwin?  It should be either "lib/libdragonfly-cygwin32.a" or "lib/libdragonfly-cygwin64.a".
answered Sep 2, 2014 by csgillis
Agreed.  If just using the default, Eclipse won't be able to find the Dragonfly library.  It must be changed to match the current environment (probably cygwin64
0 like 0 dislike
If the ENG variable is set correctly (see answer by csgillis), try to narrow down the problem.  Next make sure your Cygwin environment works correctly.  Try compiling your code outside of Eclipse.  To do this, open up a Cygwin terminal, change to the correct directory and type "make".  If it builds game.exe and you can run it there, then there is an Eclipse setup problem.  if it doesn't build game.exe, there is a problem with the Makefile or Cygwin installation.
answered Sep 2, 2014 by claypool
It seems that cygwin cannot "see" any files outside of itself (I cannot change to the correct directory for my game files).  Does the Eclipse workspace need to be in a specific place inside the cygwin folder?
You can move "oustide" of the cygwin space by doing the following insider the terminal window (as an example):

  cd /cygdrive/c

will take your working directory (shell) to the C drive root.

Or, you can copy your files into the cygwin space.  Using Windows explorer, copy your files to:

c:\cywgin\home\lrodonnell
More information about Dragonfly can be found on the Dragonfly Home Page.
...