project-navigation
Personal tools

Author Topic: Odd Compiling Problem  (Read 4148 times)

Offline Kyle873

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Odd Compiling Problem
« on: January 26, 2010, 07:40:49 am »
Hey all, I seem to be having a strange compilation problem on windows, this is using r6088 of Code::Blocks and the latest trunk of SVN.

Code: [Select]
-------------- Build: windows in game ---------------

Compiling: ..\..\src\game\g_actor.c
Compiling: ..\..\src\game\g_ai.c
Compiling: ..\..\src\game\g_ai_lua.c
Compiling: ..\..\src\game\g_client.c
Compiling: ..\..\src\game\g_cmds.c
Compiling: ..\..\src\game\g_combat.c
Compiling: ..\..\src\game\g_events.c
Compiling: ..\..\src\game\g_func.c
Compiling: ..\..\src\game\g_inventory.c
Compiling: ..\..\src\game\g_main.c
Compiling: ..\..\src\game\g_match.c
Compiling: ..\..\src\game\g_mission.c
Compiling: ..\..\src\game\g_morale.c
Compiling: ..\..\src\game\g_move.c
Compiling: ..\..\src\game\g_phys.c
Compiling: ..\..\src\game\g_reaction.c
Compiling: ..\..\src\game\g_round.c
Compiling: ..\..\src\game\g_spawn.c
Compiling: ..\..\src\game\g_stats.c
Compiling: ..\..\src\game\g_svcmds.c
Compiling: ..\..\src\game\g_trigger.c
Compiling: ..\..\src\game\g_utils.c
Compiling: ..\..\src\game\g_vis.c
Compiling: ..\..\src\game\inv_shared.c
Compiling: ..\..\src\game\inventory.c
Compiling: ..\..\src\game\lua\lapi.c
Compiling: ..\..\src\game\lua\lauxlib.c
C:\UFOAI\src\game\inventory.c: In function 'I_MoveInInventory':
C:\UFOAI\src\game\inventory.c:338: warning: ignoring return value of function declared with attribute warn_unused_result
Compiling: ..\..\src\game\lua\lbaselib.c
Compiling: ..\..\src\game\lua\lcode.c
Compiling: ..\..\src\game\lua\ldblib.c
Compiling: ..\..\src\game\lua\ldebug.c
Compiling: ..\..\src\game\lua\ldo.c
Compiling: ..\..\src\game\lua\ldump.c
Compiling: ..\..\src\game\lua\lfunc.c
Compiling: ..\..\src\game\lua\lgc.c
Compiling: ..\..\src\game\lua\linit.c
Compiling: ..\..\src\game\lua\liolib.c
Compiling: ..\..\src\game\lua\llex.c
Compiling: ..\..\src\game\lua\lmathlib.c
Compiling: ..\..\src\game\lua\lmem.c
Compiling: ..\..\src\game\lua\loadlib.c
Compiling: ..\..\src\game\lua\lobject.c
Compiling: ..\..\src\game\lua\lopcodes.c
Compiling: ..\..\src\game\lua\loslib.c
Compiling: ..\..\src\game\lua\lparser.c
Compiling: ..\..\src\game\lua\lstate.c
Compiling: ..\..\src\game\lua\lstring.c
Compiling: ..\..\src\game\lua\lstrlib.c
Compiling: ..\..\src\game\lua\ltable.c
Compiling: ..\..\src\game\lua\ltablib.c
Compiling: ..\..\src\game\lua\ltm.c
Compiling: ..\..\src\game\lua\lua.c
Compiling: ..\..\src\game\lua\lundump.c
Compiling: ..\..\src\game\lua\lvm.c
Compiling: ..\..\src\game\lua\lzio.c
Compiling: ..\..\src\game\lua\print.c
Compiling: ..\..\src\game\q_shared.c
Compiling: ..\..\src\shared\infostring.c
Compiling: ..\..\src\shared\mathlib.c
Compiling: ..\..\src\shared\parse.c
Compiling: ..\..\src\shared\shared.c
Linking dynamic library: ..\..\base\game.dll
Output size is 335.00 KB

-------------- Build: windows in ufo2map ---------------

Compiling: ..\..\src\common\files.c
Compiling: ..\..\src\common\ioapi.c
Compiling: ..\..\src\common\mem.c
Compiling: ..\..\src\common\routing.c
Compiling: ..\..\src\common\tracing.c
Compiling: ..\..\src\common\unzip.c
Compiling: ..\..\src\ports\windows\win_shared.c
Compiling: ..\..\src\shared\byte.c
Compiling: ..\..\src\shared\entitiesdef.c
Compiling: ..\..\src\shared\mathlib.c
Compiling: ..\..\src\shared\parse.c
Compiling: ..\..\src\shared\shared.c
Compiling: ..\..\src\tools\ufo2map\brushbsp.c
Compiling: ..\..\src\tools\ufo2map\bsp.c
Compiling: ..\..\src\tools\ufo2map\check\check.c
Compiling: ..\..\src\tools\ufo2map\check\checkentities.c
Compiling: ..\..\src\tools\ufo2map\check\checklib.c
Compiling: ..\..\src\tools\ufo2map\common\aselib.c
Compiling: ..\..\src\tools\ufo2map\common\bspfile.c
Compiling: ..\..\src\tools\ufo2map\common\imagelib.c
Compiling: ..\..\src\tools\ufo2map\common\polylib.c
Compiling: ..\..\src\tools\ufo2map\common\scriplib.c
C:\UFOAI\src\tools\ufo2map\common\imagelib.c: In function 'LoadPNG':
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:308: warning: implicit declaration of function 'png_check_sig'
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:355: warning: implicit declaration of function 'png_set_gray_1_2_4_to_8'
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:369: warning: 'width' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:632)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:369: warning: 'height' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:633)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:373: warning: 'channels' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:647)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:374: warning: 'height' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:633)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:375: warning: 'rowbytes' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:635)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:376: warning: 'rowbytes' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:635)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:381: warning: 'width' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:632)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:381: warning: 'height' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:633)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:382: warning: 'height' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:633)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:383: warning: 'rowbytes' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:635)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:383: warning: 'channels' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:647)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:384: warning: 'channels' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:647)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:391: warning: 'width' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:632)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:393: warning: 'height' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:633)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:394: warning: 'channels' is deprecated (declared at c:\mingw\bin\../lib/gcc/i686-pc-mingw32/4.4.1-nuwen/../../../../include/png.h:647)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c: At top level:
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:443: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jpg_fill_input_buffer'
C:\UFOAI\src\tools\ufo2map\common\imagelib.c: In function 'jpeg_mem_src':
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:462: error: 'jpg_fill_input_buffer' undeclared (first use in this function)
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:462: error: (Each undeclared identifier is reported only once
C:\UFOAI\src\tools\ufo2map\common\imagelib.c:462: error: for each function it appears in.)
Process terminated with status 1 (0 minutes, 6 seconds)
4 errors, 18 warnings
 
Process terminated with status 0 (0 minutes, 6 seconds)
4 errors, 18 warnings
 
Process terminated with status 0 (0 minutes, 6 seconds)
4 errors, 18 warnings
 
Process terminated with status 0 (0 minutes, 6 seconds)
4 errors, 18 warnings

I can't see what's wrong or what's causing the error. I brought this up on IRC but since there seem to be very few attempting to compile on Windows nobody could shed some light on the problem. Would appreciate any help as I've gotten this far but now I'm completely stumped.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Odd Compiling Problem
« Reply #1 on: January 26, 2010, 07:50:06 am »
it looks like you are using wrong versions of libjpeg and libpng

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Odd Compiling Problem
« Reply #2 on: January 26, 2010, 07:50:55 am »
you can find those versions we are using in our c::b release in this file: http://ufoai.svn.sourceforge.net/viewvc/ufoai/ufoai/trunk/contrib/scripts/codeblocks.sh?view=markup

Offline Kyle873

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Re: Odd Compiling Problem
« Reply #3 on: January 26, 2010, 12:38:43 pm »
Alright, after grabbing like 4 million dependencies and getting a working compiled EXE, I've now run into another problem.

I assume that I need to compile the po files, so I went ahead and ran compile_po.bat /ufoai in the contrib/scripts folder, needed msgfmt. Went and got that, needed iconv.dll, copied that from contrib/dlls, and now I get this:

Code: [Select]
C:\UFOAI\contrib\scripts>compile_po /ufoai

C:\UFOAI\contrib\scripts>echo off
=====================================================
po compiler for UFO:AI (http://sf.net/projects/ufoai)
'msgfmt' utility must be in your path
compile all .po files and in src\po and place them
into base\i18n\
=====================================================
Compiling UFO:AI language files.
compiling .\ufoai-bg_BG.po to "..\..\base\i18n\bg_BG\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-cs.po to "..\..\base\i18n\cs\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-da.po to "..\..\base\i18n\da\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-de.po to "..\..\base\i18n\de\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-el.po to "..\..\base\i18n\el\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-en.po to "..\..\base\i18n\en\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-es.po to "..\..\base\i18n\es\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-es_ES.po to "..\..\base\i18n\es_ES\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-et.po to "..\..\base\i18n\et\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-fi.po to "..\..\base\i18n\fi\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-fr.po to "..\..\base\i18n\fr\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-hu.po to "..\..\base\i18n\hu\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-it.po to "..\..\base\i18n\it\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-ja.po to "..\..\base\i18n\ja\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-ko.po to "..\..\base\i18n\ko\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-nl_NL.po to "..\..\base\i18n\nl_NL\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-pl.po to "..\..\base\i18n\pl\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-pt.po to "..\..\base\i18n\pt\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-pt_BR.po to "..\..\base\i18n\pt_BR\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-ru.po to "..\..\base\i18n\ru\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-sl.po to "..\..\base\i18n\sl\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-sv.po to "..\..\base\i18n\sv\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-th.po to "..\..\base\i18n\th\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure
compiling .\ufoai-zh_CN.po to "..\..\base\i18n\zh_CN\LC_MESSAGES\ufoai.mo"
msgfmt.exe: iconv failure

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Odd Compiling Problem
« Reply #4 on: January 26, 2010, 04:00:16 pm »
ensure that you have an iconv.dll in your mingw/bin directory (or whereever msgfmt.ext is)

Offline Kyle873

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Re: Odd Compiling Problem
« Reply #5 on: January 26, 2010, 05:59:02 pm »
There we go, got everything compiled and working, thanks for the help.

For anybody else who may have hit these same problems as me, it is EXTREMELY IMPORTANT to have the correct dependencies, or else you are going to run into problems. Using the link posted above is a surefire way to have the same ones that are being used to build the game.