Miert nem jon letre a statikus library? (Linux)
A unicorn engine-t akarom leforditani:
Elvileg ennyi csak a telepitese, unzip utan:
apt install cmake pkg-config
mkdir build; cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
De utana hiaba keresem mindenhol a libunicorn.a fajlt nincs sehol. A .so fajl az letrejon, de nekem a static library kene.





Ezt olvasd el: [link]
Aztán nyisd meg a CMakeList.txt fájlt, és módosítsd ezt a sort így:
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
Ezután a build könyvtárban állva célszerű kiadni egy make cleant, majd pedig folytatod a fordítást úgy, ahogy csináltad:
cmake .. -DCMAKE_BUILD_TYPE=Release
make
Ezután már el kell készülnie a libunicorn.a static librarynek.










-DUNICORN_BUILD_SHARED=OFF
Ezt én is próbáltam, de így nekem sem sikerült.
Viszont most lefordítottam egy másik gépen úgy, ahogy leírtam, teljesen előröl, és most is működött: [link]
Próbáld meg úgy, hogy a build könyvtár tartalmát teljesen töröld ki fordítás előtt.
Semmi mást nem írtam át a CMakeLists.txt-ben, csak a kérdéses sorban az ON-t OFF-ra: [link]





Kapcsolódó kérdések:
Minden jog fenntartva © 2025, www.gyakorikerdesek.hu
GYIK | Szabályzat | Jogi nyilatkozat | Adatvédelem | Cookie beállítások | WebMinute Kft. | Facebook | Kapcsolat: info(kukac)gyakorikerdesek.hu
Ha kifogással szeretne élni valamely tartalommal kapcsolatban, kérjük jelezze e-mailes elérhetőségünkön!