Making .so's

Started by
4 comments, last by BradDaBug 21 years, 10 months ago
I''ve made this GUI that is used in my game, and in Windows its a .dll. I''m trying to get it to compile in Linux. The GUI seems to compile and link and all and it creates a .so for me, but when I try to compile my game that uses it it says "Undefined reference to..." every time it calls a function that''s supposed to be in the .so. I''m including the .so when I compile with -Llibgui at the end. Is there something I have to put before I declare the functions in the .so, like _dllexport(blah) or whatever it is, like in Windows? Is there an export library? What?
I like the DARK layout!
Advertisement
If you''re using "-llibgui" to link the library, your library must be called ''liblibgui.so'' (or that must be a symlink pointing to the library). Did you use the "-shared" switch when linking the final .so?

OH! liblibgui.so! Dah! All these little querks that cost me so much hair.

Now I just gotta figure out what the OpenGL libraries are called.
I like the DARK layout!
quote:Original post by BradDaBug
Now I just gotta figure out what the OpenGL libraries are called.

libgl.so for OpenGL, libglu.so for GLU (so when linking you should use -lgl and -lglu).
For me, at least, OpenGL uses "libGL.so" and "libGLU.so" (note the capital letters), so I use "-lGL -lGLU" to link with OpenGL and GLU.

Umm, yeah, that''s what I meant , sorry.

This topic is closed to new replies.

Advertisement