captainys / TOWNSEMU

FM Towns Emulator "Tsugaru"
BSD 3-Clause "New" or "Revised" License
247 stars 18 forks source link

Reference not defined to YsSoundPlayer #19

Closed ryugold777 closed 3 years ago

ryugold777 commented 3 years ago

There is an issue when run "make".

yssimplesound.cpp:(.text+0x843): reference not defined to "YsSoundPlayer::SoundData::DeleteAPISpecificData(YsSoundPlayer::SoundData::APISpecificDataPerSoundData*)" ../externals/yssimplesound/src/libyssimplesound.a(yssimplesound.cpp.o): Na função "YsSoundPlayer::SoundData::CleanUp()": yssimplesound.cpp:(.text+0x896): referência não definida para "YsSoundPlayer::SoundData::CleanUpAPISpecific()" collect2: error: ld returned 1 exit status tests/CMakeFiles/disasm_addr.dir/build.make:161: recipe for target 'tests/disasm_addr' failed make[2]: [tests/disasm_addr] Error 1 CMakeFiles/Makefile2:2616: recipe for target 'tests/CMakeFiles/disasm_addr.dir/all' failed make[1]: [tests/CMakeFiles/disasm_addr.dir/all] Error 2 Makefile:113: recipe for target 'all' failed make: *** [all] Error 2

captainys commented 3 years ago

Can you tell me in what environment you are compiling?

ryugold777 commented 3 years ago

I tried to compile in "Bodhi linux 5.1(DE moksha) and after on "lubuntu 20.10". Receveid the same error. Now I'm using antix linux. I still not tried compile with antix.

captainys commented 3 years ago

Actually, can you check a line 6 in src/tests/CMakeLists.txt? Does it have yssimplesound_nownd in that line? The line should look like:

target_link_libraries(disasm_addr towns yssimplesound_nownd)

ryugold777 commented 3 years ago

Actually, can you check a line 6 in src/tests/CMakeLists.txt? Does it have yssimplesound_nownd in that line? The line should look like:

target_link_libraries(disasm_addr towns yssimplesound_nownd)

yes this line exists! target_link_libraries(disasm_addr towns yssimplesound_nownd)

I tried to compile by pkg from arch linux because I did not find instructions to compile

I used to compile:

cd TOWNSEMU printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

prepare() { cd TOWNSEMU

mkdir -p build

cd build

cmake ../src -DCMAKE_INSTALL_PREFIX=/usr make

captainys commented 3 years ago

OK, I think I fixed it. UNIX linker (ld) stubbornly does on-path linking. That was why you were getting an error. Programmers have been suffering, and nobody seems to be interested in fixing it.

ryugold777 commented 3 years ago

yes now works but when I try to "cmake --build main_gui it says "error: could not load cache" when I'm inside the folder /gui/src and even outside return "$ cmake --build main_gui Error: /home/rafa/TOWNSEMU/src/public/build/main_gui is not a directory"

ryugold777 commented 3 years ago

Thanks captainys now work on linux! I build on bodhi linux following instructions from arch. I think work on every distro of linux. Thanks again!

captainys commented 3 years ago

OK. I'm glad you made it work!