justinfrankel / ninjam

NINJAM server, clients, autosong, etc
GNU General Public License v2.0
328 stars 50 forks source link

fix ninjamcast to compile #10

Open federicobriata opened 4 years ago

federicobriata commented 4 years ago

Tested on Gnu/Linux Debian 9 and 10, demo here: http://live.audiohacklab.org:8000/ahl

To compile ninjamcast: cd ninjam/ninjamcast/ make

pagano commented 4 years ago

Federico, I'm trying to compile with VC++ 6 and I'm getting this errors:

LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library njclient.obj : error LNK2001: unresolved external symbol _fopenUTF8 njclient.obj : error LNK2001: unresolved external symbol _CreateDirectoryUTF8 .\Debug\ninjamcast.exe : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: 'link.exe' : return code '0x460' Stop.

TIA, Jorge

federicobriata commented 4 years ago

Hi Pagano, problably some ifdef is needed on makefile to make It work on windows. I tested only on Gnu/Linux

federicobriata commented 4 years ago

@pagano asking to Google i found this https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-warning-lnk4098?view=vs-2019 https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2001?view=vs-2019 Hope It helps to solve, let us know

tubbo commented 4 years ago

I don't know where else to put this, or who needs to hear this, but ninjamcast doesn't work with localhost. you have to use 127.0.0.1...

nykwil commented 3 years ago

Love to bump this. It's implied that you can compile this from the above comment how did you compile it? There are old branches of ninjamcast but they also can't compile. https://github.com/ayvan/ninjamcast

federicobriata commented 3 years ago

Hi, yes this is not yet merged and from 6 Nov 2020 with this git upstream ninjamcast seems to fail when this patch it's applied due to this commit: https://github.com/justinfrankel/ninjam/commit/d49c71bc8c6e356bd344f83593181bb8686aec87 @justinfrankel can you give a look?

For the moment to compile ninjamcast just take the patch and apply it manually by yourself, then to workaround the compile issue just revert the commit.

git clone https://github.com/justinfrankel/ninjam
cd ninjam
git revert d49c71bc8c6e356bd344f83593181bb8686aec87   #this is a workaround!
wget https://github.com/justinfrankel/ninjam/commit/d42cd6797b8b689dffc1b78a5b7d3459951ca56a.diff
patch -p1 < d42cd6797b8b689dffc1b78a5b7d3459951ca56a.diff

Or if you are lazy clone directly this https://github.com/AudioHackLab/ninjam it's my fork from Mar 27, 2020 with the patch already there so just compile it. This work well with Debian 9 and 10 and Ubuntu BUT it's not up to date as official ninjam main repo.