[hatari-devel] updates to cmake build system
Thomas Huth
th.huth at gmx.de
Mon Mar 15 21:29:10 CET 2010
On Mon, 15 Mar 2010 10:24:45 +0200
George Nakos <ggn at hol.gr> wrote:
> Hello Npomarede,
>
> Sunday, March 14, 2010, 2:08:50 PM, you wrote:
>
> > On Sat, 13 Mar 2010, George Nakos wrote:
>
> > Hello,
>
> > Do you have "windres" installed with mingw ?
>
> Check.
>
> > If so, could you try to run : cmake -DCMAKE_RC_COMPILER=windres .
>
> > It seems cmake under windows is using some env var based on visual
> > studio and doesn't default to windres.
Nicolas, in this case, could we set this variable by default like this
in the top-level CMakeLists.txt file:
if (WIN32 and not CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER windres)
endif()
?
> c:/msys/1.0/home/Administrator/hatari/src/cycInt.c: In function
> 'CycInt_AddAbsoluteInterrupt':
> c:/msys/1.0/home/Administrator/hatari/src/cycInt.c:325: warning:
> unknown conversion type character 'l' in format
> c:/msys/1.0/home/Administrator/hatari/src/cycInt.c:325: warning:
> format '%d' expects type 'int', but argument 5 has type 'Sint64'
> c:/msys/1.0/home/Administrator/hatari/src/cycInt.c:325: warning: too
> many arguments for format
That sounds either like your cycInt.c file is not up-to-date or like
you're using a very old or broken GCC compiler. Which compiler version
are you using?
> c:/msys/1.0/home/Administrator/hatari/src/main.c:653: warning:
> implicit declaration of function 'Win_OpenCon' [ 73%] Building C
> object src/CMakeFiles/hatari.dir/midi.c.obj ... [snip] ... [ 95%]
> Building C object src/CMakeFiles/hatari.dir/gui-win/opencon.c.obj
> Linking C executable hatari.exe
> c:/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../libmingw32.a(main.o):main.c:(.text+0xd2):
> undefined reference to `WinMain at 16' collect2: ld returned 1 exit
> status make[2]: *** [src/hatari.exe] Error 1 make[1]: ***
> [src/CMakeFiles/hatari.dir/all] Error 2 make: *** [all] Error 2
>
> Now I'm pretty sure that the winmain at 16 and win_opencon() problems
> were addressed by Thomas, and I had it working fully. Alas, this broke
> after a few updates, and for the life of me, I can't remember how it
> was fixed in the first place.
>
> I must also mention that SDLMAIN_LIBRARY isn't set (because I simply
> don't know the filename!), as well as PORTAUDIO, MATH, READLINE.
> Everything else seems to be set.
This sounds like the typical problem that you get on Windows when the
SDLMain library is not linked right. Please make sure that you point
SDLMAIN_LIBRARY to SDLmain.lib and these problems should be gone!
Thomas
More information about the hatari-devel
mailing list