Problem to rebuild SDL with Windows 7 64-bits and visual C++

Hello,
I tried to rebuil SDL with visual C++ 2010 on my 64-bits Window 7 but it doesn’t work,
I think that I put every option of visual so that it builds SDL.lib and SDL.dll in 64bits, but I get a message:

"
.
.
.
.\Release/SDL_yuv_sw.obj /MACHINE:I386
\Release/SDL.obj : fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’
"
Well, I can’t find its /MACHINE:I386, cause in project’s options I put the correct version of dxguid.lib in linker>input and in linker>advanced I put /Machine:X64.

I link the file with the options I changed
http://rapidshare.com/files/431647743/SDL-1.2.14.7z

Could someone help me?

Is my question useless? Will the rebuild make no difference?

Hi Fred,

Would SDL 1.3 work for you as well?
I’ve just checked in updated VS2008 and VS2010 solution/project files
into the HG repository. They’ve been created/tested on a Win7 64bit box.
Maybe you can backport these to SDL 1.2 as well…

–AndreasOn 11/19/10 8:56 AM, Fred wrote:

Hello,
I tried to rebuil SDL with visual C++ 2010 on my 64-bits Window 7 but
it doesn’t work,
I think that I put every option of visual so that it builds SDL.lib
and SDL.dll in 64bits, but I get a message:

"
.
.
.
.\Release/SDL_yuv_sw.obj /MACHINE:I386
\Release/SDL.obj : fatal error LNK1112: module machine type 'x64’
conflicts with target machine type ‘X86’
"
Well, I can’t find its /MACHINE:I386, cause in project’s options I put
the correct version of dxguid.lib in linker>input and in
linker>advanced I put /Machine:X64.

I link the file with the options I changed
http://rapidshare.com/files/431647743/SDL-1.2.14.7z

Could someone help me?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thank you for your answer, I will check it.

This isn’t really related to Windows 7 64 bit (I don’t think) but since this is my system, you never know.

I get a bunch of errors when compiling the new SDL 1.3 source:

1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmReleaseContext at 8 referenced in function _IME_Init
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmGetContext at 4 referenced in function _IME_Init
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmAssociateContext at 8 referenced in function _IME_Enable
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmGetIMEFileNameA at 12 referenced in function _IME_SetupAPI
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmSetCompositionStringW at 24 referenced in function _IME_ClearComposition
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmNotifyIME at 16 referenced in function _IME_ClearComposition
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _VerQueryValueA at 16 referenced in function _IME_GetId
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _GetFileVersionInfoA at 16 referenced in function _IME_GetId
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _GetFileVersionInfoSizeA at 8 referenced in function _IME_GetId
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmGetCompositionStringW at 16 referenced in function _IME_GetCompositionString
1>SDL_win32keyboard.obj : error LNK2019: unresolved external symbol _ImmGetDefaultIMEWnd at 4 referenced in function _IME_InputLangChanged

…all seem to be from from library called imm32.lib - what is this, why is it in SDL (whatever happened to it compiling out of the box??) and how can I fix this?

Thanks
Ed

UPDATE

Fixed those - found that the missing libraries are in fact windows libraries, are are in the SDK/lib directory. You have to add imm32.lib and version.lib to your linker input stuff in VS.

Only error I get now is

1>SDL_gesture.obj : error LNK2019: unresolved external symbol _SDL_atan2 referenced in function _dollarNormalize

…and there is no function body/macro for SDL_atan2…can someone help!!!

Yes, I’ve seen that as well - on VS2010 the imm32.lib reference was
missing and needs to be added to the linker dependencies.

You can fix SDL_gesture.c which seems to be looking for the SDL_atan2
define with this addition:
#ifndef SDL_atan2
#define SDL_atan2 atan2
#endif

–AndreasOn 12/21/10 7:59 AM, ebyard wrote:

UPDATE

Fixed those - found that the missing libraries are in fact windows
libraries, are are in the SDK/lib directory. You have to add imm32.lib
and version.lib to your linker input stuff in VS.

Only error I get now is

1>SDL_gesture.obj : error LNK2019: unresolved external symbol
_SDL_atan2 referenced in function _dollarNormalize

…and there is no function body/macro for SDL_atan2…can
someone help?!?!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi Andreas

Yeah this is a bit frustrating. Now I applied your patch and get this:

1>SDL_gesture.obj : error LNK2019: unresolved external symbol _atan2 referenced in function _dollarNormalize

…which is crazy as atan2 is in the Windows standard libraries, and I am including the right paths to header files in my project/environment settings.

I don’t know what’s wrong…but it’s really annoying!!

Thanks

For reference, I’ve just commented out the calls to this function for now. This needs a proper fix, I think!