Compilation error on example "multiple"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- cmake, cpp
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu trong examples/CMakeLists.txt, tại khai báo add_executable của ví dụ multiple, và tái hiện lỗi bằng các lệnh cmake và make được ghi trong tài liệu. Kiểm tra cách tên target xung đột với thư mục mã nguồn multiple, sau đó thực hiện thay đổi nhỏ nhất về tên hoặc cấu hình để tránh xung đột. Hoàn tất khi ví dụ multiple liên kết thành công và quá trình build hoàn thành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
Running on linux ubuntu 25.10
This is my first contact with the project, so I might have made some mistake.
Went through the short procedure for testing the install.
git clone https://github.com/RobLoach/raylib-cpp.git
cd raylib-cpp
mkdir build
cd build
cmake ..
make
Couldn't get further as the build failed on the multiple example link, with the error:
[ 95%] Linking CXX executable multiple
/usr/bin/ld: cannot open output file multiple: est un dossier
"output file multiple: est un dossier" translates to something like "output file multiple: is a directory"
Went to examples/CMakeLists.txt, which on lines 57-59 reads like:
# Multiple Files Example
add_executable("multiple" multiple/main.cpp multiple/Player.cpp)
target_link_libraries("multiple" PUBLIC raylib_cpp raylib)
This creates a multiple executable file in the examples/CMakeFiles/multiple.dir/ which already contains a multiple directory for the generated objects, hence the conflict.
Not being a cmake expert, I've had hard times finding how to resolve the problem except by changing one of the names involved, meaning, either the source directory name or target executable.
Being lazy straight, I changed the executable target name to mooltiple (in reference to the mooltipass https://www.youtube.com/watch?v=yQMpfII_Jjw).
Not being an expert, I can't exactly tell if I've been just doing things wrong from the start, and I guess there might be a better solution (or name at least), but made it work for me. Not feeling confident enough to make a PR though. So just let you know, in case there is a real problem and you have a better idea.
Anyway, thanks for the project, this is cool :)
- Ngôn ngữ chính
- C++
- Star
- 960
- Fork
- 120
- Merge trung bình
- 10 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RobLoach/raylib-cpp
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
RobLoach/raylib-cpp#427 ·
-
Code gen Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
RobLoach/raylib-cpp#415 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
RobLoach/raylib-cpp#370 · 1 bình luận ·
-
SDF Font Support Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
RobLoach/raylib-cpp#366 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
RobLoach/raylib-cpp#359 · 5 bình luận ·
Tất cả issue của RobLoach/raylib-cpp
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
autowarefoundation/autoware_universe#13413 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
automated-analysis bug memory-safety
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gazebosim/gz-sensors#662 · 1 bình luận ·