Can't compile in VS2008

Questions about Marilou Open Devices Access (MODA)
Post Reply
Calu
Posts: 2
Joined: Mon Jul 12, 2010 8:49 pm

Can't compile in VS2008

Post by Calu » Sun Aug 01, 2010 9:09 pm

Hi.
I am trying to compile a project using MODA. I included the lib and include directories and added xklib-x86-win-vc2008.lib and moda-x86-win-vc2008.lib
in additional dependencies.
I get lot of error msj in other files, like
C:\Archivos de programa\Microsoft SDKs\Windows\v6.0A\include\ws2def.h(384) error C2143: syntax error : missing '}' before 'constant'
C:\Archivos de programa\Microsoft SDKs\Windows\v6.0A\include\ws2def.h(577) : error C2011: 'sockaddr_in' : 'struct' type redefinition
My project uses WinDDK.
I compiled the samples that come with Marilou and they have no problems.

Any idea?
Many thanks.

LR
Posts: 305
Joined: Mon Feb 12, 2007 11:55 pm
Location: FR

Post by LR » Mon Aug 02, 2010 11:46 am

Hi,

Perhaps the WinDDK and MODA standard includes are in conflic.

I suggest you download Marilou 2010: xklib and moda are now inside the same library (it is easier to re-build MODA if required, and you have only one lib to link to your project).

So, in windowstolinux.h, we include "Winsock2.h" (see the end of the file). Probably this include is in conflic with the ws2def.h v6.0a file ... try to remove it or change it for windows.h or ws2def.h.

Or, remove all reference to ws2def.h from your project ...
LR

Calu
Posts: 2
Joined: Mon Jul 12, 2010 8:49 pm

Post by Calu » Mon Aug 02, 2010 2:26 pm

Thanks for your answer.
The problem was just an error in the include order. I moved the include "Modacpp.h" to the top and it worked.

Post Reply