Windows build errors

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Windows build errors

Postby pHySiQuE » Mon Jul 02, 2012 1:08 pm

The current revision has a lot of build errors on Windows having to do with unix threading. I don't believe it's even possible to include pthreads.h on Windows.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Windows build errors

Postby Julio Jerez » Mon Jul 02, 2012 1:32 pm

I am confused, did you madea apost that yo uhave it all working?
http://newtondynamics.com/forum/viewtopic.php?f=26&t=7305&p=50052#p50052

I mentioned before that a user said that if we add ptread for windows, then engine code can be unified as a Unix BSD compliance library for all platformes.
This is not 100% true since there is not cross platfrom standarised simd library. But as fart as threading goes it is true.

you just need to open the project and if you are using DLL you do not need to do anything, if you are using static linking tnem you need to include suproject
..\packages\thirdParty\pthread\pthread.vcproj
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Windows build errors

Postby pHySiQuE » Mon Jul 02, 2012 1:41 pm

Ah, I see. I will add a note of that.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Windows build errors

Postby pHySiQuE » Mon Jul 02, 2012 2:42 pm

I actually had tried everything except Windows, since I never had problems in the past with building for Windows.

I included the pthreads.lib library and header folders, but I get these errors in Visual Studio:
Code: Select all
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>dgNarrowPhaseCollision.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>dgWorld.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>dgThreadHive.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>Newton.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>dgBody.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>dgBroadPhaseCollision.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>dgCollisionCompound.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>dgContact.obj : error LNK2001: unresolved external symbol __imp__sched_yield
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__sem_init
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__sem_destroy
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__sem_post
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__pthread_join
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__pthread_create
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__pthread_getschedparam
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__pthread_setschedparam
1>dgThread.obj : error LNK2001: unresolved external symbol __imp__sem_wait
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Windows build errors

Postby Julio Jerez » Mon Jul 02, 2012 2:49 pm

in visual studio 2010 you need to add the libary
Properties/common Propertoes/add new reference

in VS 2009 you ne to make core, depande on pthread using dependencies.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Windows build errors

Postby pHySiQuE » Wed Jul 04, 2012 3:06 pm

pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron