PDA

View Full Version : pthread.h?


ChessyCats
02-16-2012, 08:46 AM
Hey guys,

I'm trying to get a server running using Huppy's stickied guide. I've already fixed many problems by searching the forums and feel like I'm getting closer to success. However, I get this error now: fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory.

Using search, I've found where a couple of others talk about this issue, but I can't figure out how to fix it, if it's possible. If I understand the problem correctly, it comes from an improper reference for _WINDOWS. I tried using find and replace and changing it but it only gave me a pile of new errors.

For reference, I am on 64-bit Windows 7 using the latest 64-bit versions of Perl and MySQL, and I am trying to compile on the 64-bit platform too. Any information would be very appreciated. Thank you.

ChessyCats
02-18-2012, 08:10 AM
After a couple more days of searching, I'm not sure anything can be done about this compile error.

Can anyone recommend a different guide that doesn't involve compiling? I know there are several, I just don't know which are reliable anymore. I tried two different ones I found on this site, but no matter how careful I was, it just didn't work. I've set up a server a couple of years ago and I don't remember it being this difficult. Is it because I'm on a 64-bit system?

trevius
02-18-2012, 08:32 AM
Well, I think it all depends on exactly what all you have installed. Different versions of VS will need to use different serverX.sln files. And different ones may allow different versions of mysql and perl.

If you want one to work for sure, you should try to use the exact versions of perl, mysql and VS that are specified. For Windows, I still use VS2008, and have no problems with it as long as I use the right versions of perl and mysql.

I haven't messed with the newer build stuff, as I have seen a lot of issues reported and I don't see many benefits from making the upgrades. Though, Secrets said that VS2011 supposedly makes a compile that will process some things quicker.

ChessyCats
02-18-2012, 05:08 PM
Thank you Trevius! Yes, I am using the newest 64 bit versions of all programs plus VS 2010. I suppose I should just dig around the net and see if I can find the older versions of those programs instead of trying to mess with this. Thank you for the reply.

Uleat
04-25-2012, 04:40 AM
Old thread I see..but I seem to remember the pthread.h issue came up when I forgot to set the install lib files option with mysql.

gibroni
04-25-2012, 11:27 AM
sounds like u didnt set up include and library directories in vs before compiling

Uleat
04-28-2012, 04:42 AM
My pthread.h issue was related to a recent compile on EQEmuLoginServer. When I first installed my server (circa rev2092), I seem to recall attempting to compile EQEmuLoginServer using the .sln. I thought that it compiled correctly back then, but now I'm receiving a complete failure..something like 33 fatal errors.

Was there a recent change, that I haven't found yet, that affects this? I thought I remembered reading that some svn directories were moving on something, but I can't find that thread again.

My VC9 Server compiles just fine..it's just the LoginServer.

Thanks!

lerxst2112
04-28-2012, 04:20 PM
It used to work for me without modification. I just added the vcproj file to my server solution and it was fine. I suspect that the affected code was changed when the 32/64 bit changes were made, but it doesn't really matter.

It's expecting _WINDOWS to be defined for the Windows build. Right-click the project, and go to C/C++->Preprocessor and add ;_WINDOWS to the end of the Preprocessor Definitions string for each build you want to support. Changes are you'll only build release so it's probably fine to just add it there.

Uleat
04-28-2012, 10:15 PM
I'll do that when I get home tonight and try again.

Thanks Lerxst!

Uleat
04-29-2012, 02:15 AM
Preprocessor mod worked like a charm - Thanks!

Not sure if conversion is feasable for Server10.sln..I may try it and poke around to see what changes are made..and if it will compile and run.

U

Uleat
04-29-2012, 05:06 AM
** See Title **

This is what I tried on my non-server computer:

VC9 & EQEmuLoginServer.sln:
- Added the recommended "_WINDOWS" to the precompiler
- Compiled and appears to work

VC10 & EQEmuLoginServer.vcproj:
- Added to my Server10.sln
- Compiled and appears to work

* Never convert an older VC version file to a newer one unless you are instructed to do so or know how to fix it *

VC10 & EQEmuLoginServer.sln:
- Vcproj convert appeared to work..did not convert EQEmuLoginServer.suo
- Compiled and appears to work.. will continue using this version