Page 2 of 2

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Fri Apr 07, 2017 6:56 pm
by justafish
deen wrote:The C files should be compiled with a C compiler, not with a C++ one. That's all I can tell though, hopefully someone with Visual Studio experience can chime in.
I guess I am not that experienced with C compiler. I just followed the guide and hoped the setup would work for me c: I know how to code, just not how to set things up ._.
BeaR wrote:Looks like the scripts for generating the protocol files aren't executed properly. Either call them manually or fix your python setup.
How can I call them manually? Which protocol files are you talking about.. what is a protocol file ._.?


If it is easier to get everything to work under Linux I could try that as well.

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Fri Apr 07, 2017 9:16 pm
by Ryozuki
justafish wrote:
deen wrote:The C files should be compiled with a C compiler, not with a C++ one. That's all I can tell though, hopefully someone with Visual Studio experience can chime in.
I guess I am not that experienced with C compiler. I just followed the guide and hoped the setup would work for me c: I know how to code, just not how to set things up ._.
BeaR wrote:Looks like the scripts for generating the protocol files aren't executed properly. Either call them manually or fix your python setup.
How can I call them manually? Which protocol files are you talking about.. what is a protocol file ._.?


If it is easier to get everything to work under Linux I could try that as well.
You have python installed and or added it to the windows PATH?

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Fri Apr 07, 2017 11:04 pm
by justafish
Ryozuki wrote:You have python installed and or added it to the windows PATH?
Yes I have python3 installed and added to my windows path. I can reach it from the cmd anywhere with the command
"python"

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Sat Apr 08, 2017 8:43 pm
by milk
justafish wrote:I have been trying to follow this guide, but I just can't get it to work.
Here is what I get in Visual Studio Express 10.0:
http://pasted.co/aae99a7a

Errors everywhere! Can someone please help me? :/
I was able to get these errors when completely removed python (my visual studio crashed then actually). So I assume Bear is right.
Try to reinstall python maybe. (If you didn't do this)

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Sun Apr 09, 2017 8:26 pm
by BeaR
justafish wrote:
BeaR wrote:Looks like the scripts for generating the protocol files aren't executed properly. Either call them manually or fix your python setup.
How can I call them manually? Which protocol files are you talking about.. what is a protocol file ._.?
I should have clarified it. On windows, bam assumes that *.py files are associated with the python installation. This probably didnt happen on your system during the python installation. So bam tries to call `compile.py` (and the other datasrc scripts) but they won't be exectued.
As you have installed python already, you can try to simply execute the scripts in /datasrc manually, which will generate some C/C++ files. (I don't remember the output directory, somthing like src/generated..)
Please double-check if you call them manually that these files are generated, might have to call the scripts from a different directory!

The proper way would be as milk described to fix the problem. This means manually associating *.py files with your python interpreter (compiler, w/e) or re-installing it from scratch. IIRC you can select during installation if you want the installer to setup the association for you.

Linux is also an option, but shouldn't be much harder on windows (:
I hope this helps!

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Sun Apr 09, 2017 8:59 pm
by justafish
Thank you guys for the help! I will try as soon as I have time :)!

I do think that I tried running the *.py scripts manually from the terminal, but I don't think they actually generated anything.
Also I have to say that I had some problem with just getting the "rights" for bam.exe to execute properly, and when i press F7 the script pops up a fresh (none privileged and missing dependencies) terminal which bam.exe start to run at. Bam will complain about missing "cl" (which I figured was some kind of dependencies/etc from VS... so I had to manually run some vsusarr-ish.bat command from (visual studio 2010)/VC/ before I could run bam manually.)

I will try again, will come back for more awesome feedback if needed :D!

----------
Funny thing, right after I wrote this I think I know exactly what you mean now. When I clicked F7 sublime was weirdly popping up with random python scripts at my face... which I suppose was actually going to get executed by python, not edited by sublime.

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Tue Nov 21, 2017 3:39 pm
by DEXi
Visual studio 2010 doesn't compile "DDNet" anymore. ( lack "log2f" function and ...)

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Thu Jan 30, 2020 4:30 pm
by Yair
when i tried to compile it saying there were build errors.
the error is: Severity Code Description Project File Line Suppression State
Error MSB3073 The command "bam client_release" exited with code 1. ddnet C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets 38

the ddnet.log file saying:
" bam: error opening 'bam.lua'
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "bam client_release" exited with code 1."

how to fix that?

Re: How to compile and debug ddnet on Windows in Visual Studio

Posted: Sat Feb 01, 2020 12:17 am
by deen
bam is no longer used. Check out the updated cmake based tutorial: viewtopic.php?f=16&t=5765