Hi,
this is the output I got from a first time compile on Win7 64Bit (Visual Studio Express). I followed the tutorial on the wiki as good as I can.
http://pastebin.com/raw.php?i=WazPyjnG
Could someone help me out what went wrong?
I do know that winsock has something to do with the internet connectivity of TPT (and in general) but I have no clue what to do to get around the errors in the build log to have a clean compile.
Thanks for your help so far and taking the time to find a solution :). In the meantime, I've googled a bit and it seems that there is a conflict between winsock.h and winsock2.h. It seems that somewhere in the 'include tree' both are included and thus clash (more specifically somewhere windows.h gets called which calls winsock.h which then clashes with winsock2.h).
Some people got the exact same error and one guy solved it but his solution is not applicable here, I think since TPT is not using wxWidgets (which is, from what I understand, a GUI framework?) and using the mentioned #define WIN32_LEAN_AND_MEAN trick did not work here:
Summing up, it might be possible that somewhere the 'old' winsock.h gets included (via windows.h or other include files) and that it clashes with the 'new' winsock2.h. It is possible that the include of winsock.h is several levels deep. I haven't been able to find it in the project files.
The only include of windows.h I was able to find is in bzlib.h - winsock.h did not figure anywhere in the source.
I hope that this helps (to help me that is ;)).
ok, I'll retry to follow the instructions (am a bit tired here so maybe there was a mistake - but I already tried two times before, but we'll see) and if it does not work, I'll post you a link to the zipped project.
----------------------
new post (no double-posts allowed):
k, no workey ..... :-/ - here's the zip:
http://minus.com/lqpGSgANEIhwE
by the way: when I cut&paste several include lines down after http.h (where the 'new' winsock2.h gets called), it spews out the errors much earlier (after going through http.c and interface.c).
I moved down these include lines after http.h: pthread.h, bzlib.h and misc.h (all possible culprits for calling windows.h --> winsock.h). I moved them because one solution on the net said that when calling (directly or indirectly) winsock2.h first, there should be no problems.
Curiously enough when I move them back up (above http.h) or down again, I always get the errors early on (after http.c and interface.c). But it could just be, that VC tries to recompile the changed files first so that the errors come earlier. I hope I am making some sense here (English is not my native language).
And thanks again for helping me with this compile issue!
I think I did have this problem one time, but I don't remember the solution.
If you read the wiki you know that there is a link to a working full visual studio project that compiles without any issues. All you might need to do is update the source and add newer files to the project. If you wait a minute I'll go ahead and update the project to the latest.
EDIT: Ok, I updated the project link to be latest github, just after v82. The v83 beta is an entirely different source and doesn't compile nicely on visual studio yet.
I just tried the premade build by you. Compiling it works fine now, thanks! I still hope that the other problem gets resolved so that the wiki instructions work for all people (including people with strange problems like me ;)).
I am just starting with all the C-programming stuff so I thought it would be a good idea to go the more complex route (although a well explained one ;)) to learn how to do things. That is why I did not use the premade build in the beginning.
P.S.: The build didn't like one of my former stamps though, crashed - but was nothing big, redrawing it and then it worked no problem (if you need the stamps (just a few lines, dabbling around with yeast growth) for debugging or similar, just tell me).
#include <http>
in the source code, it'll include the wrong http.h if $(ProjectDir)Includes isn't before everything else (because the preprocessor will look through the other include directories and find the wrong http.h first)ah, that's where I kind of hiccuped in the wiki too. I read 'open the drop down, click on edit and then add ...' and went 'huh? there is no add, only edit, so let's try that, oh no add/edit button either' so I entered the path from the wiki, clicked 'ok' (or whatever it was) and the include path was empty except for the path entered from the wiki.
I thought 'ohoh, from what I know, includes are important and there were a lot of include paths (presumably important for that reason) that I just deleted' and since it said 'add' in the wiki, I just did that (i.e. reopened a new project to salvage the deleted include paths and added the one from the wiki).
Hehe, that's what happens when a programming noob tries to compile a project ;))).
And yeah, it would be good to write in the wiki that the 'edit'-action from the dropdown deletes all the other include paths (because it said 'add', not 'replace'). That was what threw me off course.
This src\http.c error occured to me indeed (as it was not along / in the same format as the other errors) but I just summed it up under the winsock error.
Wow and thanks again for sorting this out!!
P.S.: I did another run-through, now with the new understanding - worked fine now! xD