-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[build] Yet another issue with Makefile and the documentation #472
Comments
Could you paste the link errors and the exact build commands? |
The issue with GLFW3 is because it builds with those different linker names depending upon if it was built as static or shared. The wiki instructions to build GLFW3 result in a static library known as lglfw3 and that is what the Makefile is looking for by default. If one has installed GLFW3 with a package manager, it is the shared variety named lglfw. I might have the names crossed but I think it's right. Making use of GLFW_LIBTYPE seems like a logical addition if you want that control. Basically, it's a switch for the linker name? I'm not seeing your changes for some reason. You are right, more documentation will help too. BTW, you may know this already but, raylib now bundles GLFW3 and there is no need to link to it unless you want to. Are you passing USE_EXTERNAL_GLFW=TRUE to make? If it's FALSE, one shouldn't have this problem. On build systems, raysan5 develops raylib with make and that's not likely to change. You can use cmake if you prefer. There's even some meson stuff in project/Builder if you want to go that route. |
Thanks for your replies. I started a clean installation and got stuck with the same issues.
My solution was adding
And my solution was adding the
@RDR8 The GLFW_LIBTYPE would be in fact a switch and using USE_EXTERNAL_GLFW isn't working for me (I should double check it and the Makefile). And in fact, I followed the Wiki instructions to link raylib with system GLFW (which is a shared lib due to |
@a3f I wonder if this has anything to do with raylib.h differing in raylib/src and raylib/release/include? I had a compile time issue with textures_image_generation/"perlinnoises" when using raylib/release/include/raylib.h which went away after @vbarboza I have not done anything with an external, compiled static or distro-packaged shared, GLFW since raysan5 started bundling it. It was working ok except for that -lglfw(3) oddity. Since your line aboves show that you are using libraylib.a, you shouldn't have had any problems. You're deviating from the standard setup in two ways, USE_EXTERNAL_GLFW=TRUE and having a distro-packaged version of GLFW. The default setup seemed alright to me but it's possible the dual-inclusion problem above was introduced by my updates to the Makefiles, but the edits were mostly limited to RAYLIB_LIBTYPE=SHARED. I'll review the docs and usage of the default static build target and USE_EXTERNAL_GLFW when I get a chance. Holler back if you figure it out. As far as I know, |
Today I checked the @a3f |
@vbarboza Tracking down the multiple defs, Do you have raylib installed with I haven't looked over games/ or templates/ makefiles in a while. I am working on extending and documenting the install : target and usage of the examples. If that works out well, I'll try to push the _PATHs out to the other makefiles. I still don't really know the ins and outs of your use case. |
I saw briefly, but it went away for unknown reasons after some tinkering. |
@vbarboza I can only recreate your problem compiling the texture example in one scenario. It only happens with a brand new copy of raylib source tree. The raylib source package comes with a pre-built libraylib and some other object files so that one can compile the examples without |
It should work ok now. Just closing this issue. Feel free to reopen it if problem persists. |
Please, correct me if I'm wrong opening this issue as I have seen already issues #332, #336 and #401 dealing with different approaches (build on Linux, cmake and packaging). I've also read somewhere we are not deprecating the Makefile and changing the dependencies on openAL and GLFW, so here is my problem.
Yesterday I started reading the docs (https://github.com/raysan5/raylib/wiki/Compile-for-GNU-Linux) and building on my Linux Mint 18 (Ubuntu 16.04 LTS for all the matters), x86_64. The raylib compiles alright, but the
examples/
andgames/
don't.In
examples/
I had to allow multiple function definitions or it wouldn't compile:-Wl,-allow-multiple-definition
, install libopenal-dev and add it to theLDLIBS
.In
games/
I had to change the-lglfw3
to-lglfw
as I read somewhere around the mentioned issues (but I missed comments or documentation regarding this, so I'm opening this). My solution added aGLFW_LIBTYPE
which I'm not sure is the best way to go.My changes were commited to my fork (https://github.com/vbarboza/raylib/tree/develop) - not sure if a PR is appropriate.
The text was updated successfully, but these errors were encountered: