Problem when compiling BULL

stmartin

aka. poyuzhe
Joined
Aug 4, 2007
Messages
640
Location
Shanghai
Here's the error message:

Spoiler :
NMAKE : fatal error U1095: expanded command line 'del Debug\CvGameCoreDLL.dll Debug/_precompile.obj Debug\CvArea.obj Debug\CvArtFileMgr.obj Debug/CvBugOptions.obj Debug\CvCity.obj Debug\CvCityAI.obj Debug\CvDLLButtonPopup.obj Debug\CvDLLEntity.obj Debug\CvDLLPython.obj Debug\CvDLLWidgetData.obj Debug/CvDeal.obj Debug/CvDiploParameters.obj Debug/CvDllPythonEvents.obj Debug/CvDllTranslator.obj Debug\CvEventReporter.obj Debug\CvFractal.obj Debug\CvGame.obj Debug\CvGameAI.obj Debug\CvGameCoreDLL.obj Debug\CvGameCoreUtils.obj Debug\CvGameInterface.obj Debug\CvGameTextMgr.obj Debug\CvGlobals.obj Debug\CvHallOfFameInfo.obj Debug\CvInfoWater.obj Debug\CvInfos.obj Debug\CvInitCore.obj Debug\CvMap.obj Debug\CvMapGenerator.obj Debug\CvMessageControl.obj Debug\CvMessageData.obj Debug\CvPlayer.obj Debug\CvPlayerAI.obj Debug\CvPlot.obj Debug\CvPlotGroup.obj Debug\CvPopupInfo.obj Debug\CvPopupReturn.obj Debug\CvRandom.obj Debug\CvReplayInfo.obj Debug\CvReplayMessage.obj Debug\CvSelectionGroup.obj Debug\CvSelectionGroupAI.obj Debug\CvStatistics.obj Debug\CvStructs.obj Debug\CvTalkingHeadMessage.obj Debug\CvTeam.obj Debug\CvTeamAI.obj Debug\CvUnit.obj Debug\CvUnitAI.obj Debug\CvXMLLoadUtility.obj Debug\CvXMLLoadUtilityGet.obj Debug\CvXMLLoadUtilityInit.obj Debug\CvXMLLoadUtilitySet.obj Debug\CyArea.obj Debug\CyAreaInterface.obj Debug\CyArgsList.obj Debug\CyArtFileMgr.obj Debug\CyArtFileMgrInterface.obj Debug\CyCity.obj Debug\CyCityInterface1.obj Debug\CyDeal.obj Debug\CyEnumsInterface.obj Debug\CyGame.obj Debug\CyGameCoreUtils.obj Debug\CyGameCoreUtilsInterface.obj Debug\CyGameInterface.obj Debug\CyGameTextMgr.obj Debug\CyGameTextMgrInterface.obj Debug\CyGlobalContext.obj Debug\CyGlobalContextInterface1.obj Debug\CyGlobalContextInterface2.obj Debug\CyGlobalContextInterface3.obj Debug\CyGlobalContextInterface4.obj Debug\CyHallOfFameInfo.obj Debug\CyHallOfFameInterface.obj Debug\CyInfoInterface1.obj Debug\CyInfoInterface2.obj Debug\CyInfoInterface3.obj Debug\CyMap.obj Debug\CyMapGenerator.obj Debug\CyMapGeneratorInterface.obj Debug\CyMapInterface.obj Debug\CyMessageControl.obj Debug\CyMessageControlInterface.obj Debug\CyPlayer.obj Debug\CyPlayerInterface1.obj Debug\CyPlayerInterface2.obj Debug\CyPlot.obj Debug\CyPlotInterface1.obj Debug\CyRandomInterface.obj Debug\CyReplayInfo.obj Debug\CySelectionGroup.obj Debug\CySelectionGroupInterface.obj Debug\CyStructsInterface1.obj Debug\CyTeam.obj Debug\CyTeamInterface.obj Debug\CyUnit.obj Debug\CyUnitInterface1.obj Debug\FAssert.obj Debug\FDialogTemplate.obj Debug/CxImage/general/tif_xfile.obj Debug/CxImage/general/ximabmp.obj Debug/CxImage/general/ximadsp.obj Debug/CxImage/general/ximaenc.obj Debug/CxImage/general/ximaexif.obj Debug/CxImage/general/ximage.obj Debug/CxImage/general/ximagif.obj Debug/CxImage/general/ximahist.obj Debug/CxImage/general/ximaico.obj Debug/CxImage/general/ximainfo.obj Debug/CxImage/general/ximaint.obj Debug/CxImage/general/ximaj2k.obj Debug/CxImage/general/ximajas.obj Debug/CxImage/general/ximajbg.obj Debug/CxImage/general/ximajpg.obj Debug/CxImage/general/ximalpha.obj Debug/CxImage/general/ximalyr.obj Debug/CxImage/general/ximamng.obj Debug/CxImage/general/ximapal.obj Debug/CxImage/general/ximapcx.obj Debug/CxImage/general/ximapng.obj Debug/CxImage/general/ximasel.obj Debug/CxImage/general/ximatga.obj Debug/CxImage/general/ximath.obj Debug/CxImage/general/ximatif.obj Debug/CxImage/general/ximatran.obj Debug/CxImage/general/ximawbmp.obj Debug/CxImage/general/ximawmf.obj Debug/CxImage/general/ximawnd.obj Debug/CxImage/general/xmemfile.obj Debug/CxImage/jpeg/jcapimin.obj Debug/CxImage/jpeg/jcapistd.obj Debug/CxImage/jpeg/jccoefct.obj Debug/CxImage/jpeg/jccolor.obj Debug/CxImage/jpeg/jcdctmgr.obj Debug/CxImage/jpeg/jchuff.obj Debug/CxImage/jpeg/jcinit.obj Debug/CxImage/jpeg/jcmainct.obj Debug/CxImage/jpeg/jcmarker.obj Debug/CxImage/jpeg/jcmaster.obj Debug/CxImage/jpeg/jcomapi.obj Debug/CxImage/jpeg/jcparam.obj Debug/CxImage/jpeg/jcphuff.obj Debug/CxImage/jpeg/jcprepct.obj Debug/CxImage/jpeg/jcsample.obj Debug/CxImage/jpeg/jctrans.obj Debug/CxImage/jpeg/jdapimin.obj Debug/CxImage/jpeg/jdapistd.obj Debug/CxImage/jpeg/jdatadst.obj Debug/CxImage/jpeg/jdatasrc.obj Debug/CxImage/jpeg/jdcoefct.obj Debug/CxImage/jpeg/jdcolor.obj Debug/CxImage/jpeg/jddctmgr.obj Debug/CxImage/jpeg/jdhuff.obj Debug/CxImage/jpeg/jdinput.obj Debug/CxImage/jpeg/jdmainct.obj Debug/CxImage/jpeg/jdmarker.obj Debug/CxImage/jpeg/jdmaster.obj Debug/CxImage/jpeg/jdmerge.obj Debug/CxImage/jpeg/jdphuff.obj Debug/CxImage/jpeg/jdpostct.obj Debug/CxImage/jpeg/jdsample.obj Debug/CxImage/jpeg/jdtrans.obj Debug/CxImage/jpeg/jerror.obj Debug/CxImage/jpeg/jfdctflt.obj Debug/CxImage/jpeg/jfdctfst.obj Debug/CxImage/jpeg/jfdctint.obj Debug/CxImage/jpeg/jidctflt.obj Debug/CxImage/jpeg/jidctfst.obj Debug/CxImage/jpeg/jidctint.obj Debug/CxImage/jpeg/jidctred.obj Debug/CxImage/jpeg/jmemmgr.obj Debug/CxImage/jpeg/jmemnobs.obj Debug/CxImage/jpeg/jquant1.obj Debug/CxImage/jpeg/jquant2.obj Debug/CxImage/jpeg/jutils.obj Debug\CvGameCoreDLL.lib Debug\CvGameCoreDLL.def Debug\CvGameCoreDLL.exp Debug\CvGameCoreDLL.pdb Debug\CvGameCoreDLL.ilk' too long

1>Stop

I'm using VC++ express 2008. If this because of the version of nmake?
 
But you use VC++ Toolkit 2003 to do the actual compilation and linking, right? VS 2008, which I use, just calls nmake from the PSDK which uses VC++ to do the compilation.

Also, I notice some of those paths have a / instead of a \. What's up with that? It seems random. In any case, this is failing during the clean command, so I recommend deleting the .obj files manually and do a normal build.
 
Thanks for all the generosity and sharing all this great code design with us. :goodjob: I'm compiling a version of RevDCM with Bug 4.0 and Bull 1.0. At this stage the compiler complains about two files because it cannot link them:
ximawnd.cpp
CvGame::takeJPEGScreenShot(std::string fileName) const

I've commented out the code in the entire ximawnd file and the code in the cvgame function and it links fine and seems to run well (early days). If I comment out the code in one or the other, it will not link either. I'm using VC2008 with Refar's instructions and have been using it for the last 18 months at least.

EDIT: The makefile has been updated for the cximage resources and code, the extra objects and CvBugOptions code files. The problem would appear to be minor and so there is no hurry. It will get sorted some how.

Cheers.
 
Thanks for the interest. If I uncomment CvGame::takeJPGScreenShot() I get these linker errors:
Spoiler :

1>CvGame.obj : error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function "public: bool __thiscall CvGame::takeJPEGScreenShot(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?takeJPEGScreenShot@CvGame@@QBE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>CvGame.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CxImage::CreateFromHBITMAP(struct HBITMAP__ *,struct HPALETTE__ *)" (?CreateFromHBITMAP@CxImage@@QAE_NPAUHBITMAP__@@PAUHPALETTE__@@@Z) referenced in function "public: bool __thiscall CvGame::takeJPEGScreenShot(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?takeJPEGScreenShot@CvGame@@QBE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>CvGame.obj : error LNK2019: unresolved external symbol __imp__BitBlt@36 referenced in function "public: bool __thiscall CvGame::takeJPEGScreenShot(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?takeJPEGScreenShot@CvGame@@QBE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>CvGame.obj : error LNK2019: unresolved external symbol __imp__SelectObject@8 referenced in function "public: bool __thiscall CvGame::takeJPEGScreenShot(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?takeJPEGScreenShot@CvGame@@QBE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>CvGame.obj : error LNK2019: unresolved external symbol __imp__CreateCompatibleBitmap@12 referenced in function "public: bool __thiscall CvGame::takeJPEGScreenShot(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?takeJPEGScreenShot@CvGame@@QBE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>CvGame.obj : error LNK2019: unresolved external symbol __imp__CreateCompatibleDC@4 referenced in function "public: bool __thiscall CvGame::takeJPEGScreenShot(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?takeJPEGScreenShot@CvGame@@QBE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)



If I uncomment out the entire ximawnd.cpp file I have to rebuild from scratch to get the linker errors from it so will keep it simple for now. Attached is my makefile.

Thanks again!
Cheers
 

Attachments

I set this up a while ago, but I think I may have had to add a new library to get the ximage stuff to link. I wish I had taken notes at the time (sigh), but check your VC++ 2003 Toolkit's lib folder. Do you have the library "MFC42D.DLL"? If not, download it and place it there. If so, let me know and I'll look for other libs. That one sounds very familiar to me though, and it's modified date is 2004, a year after the other libs in that folder.
 
Well you have done a superb job so the occasional slip in note taking is understandable with so much detail. That lib didn't work. Downloaded it and put it in the toolkit. The urgency is low for now because it looks like the RevDCM BUG+BULL SVN merge is working well from all reports. Would be nice to fix and probably it is a lib that is within the genuine vc2003 pro toolkit. I bet Jdog would be able to link it.
Cheers.
 
I set this up a while ago, but I think I may have had to add a new library to get the ximage stuff to link. I wish I had taken notes at the time (sigh), but check your VC++ 2003 Toolkit's lib folder. Do you have the library "MFC42D.DLL"? If not, download it and place it there. If so, let me know and I'll look for other libs. That one sounds very familiar to me though, and it's modified date is 2004, a year after the other libs in that folder.

Just a question here. I've downloaded and added MFC42D.DLL to my 2003 Toolkit Lib folder, but I still get errors compiling a debug build. Normal builds work fine, but I need a debug build to check for crashes.

Here's the error:

Spoiler :

> Creating library Debug\CvGameCoreDLL.lib and object Debug\CvGameCoreDLL.exp
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_finish_decompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_read_scanlines referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_start_decompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_calc_output_dimensions referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_read_header referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_CreateDecompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_destroy_decompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_std_error referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_resync_to_restart referenced in function "public: __thiscall CxImageJPG::CxFileJpg::CxFileJpg(class CxFile *)" (??0CxFileJpg@CxImageJPG@@QAE@PAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_finish_compress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_write_scanlines referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_start_compress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_simple_progression referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_set_quality referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_set_colorspace referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_set_defaults referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_CreateCompress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_destroy_compress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>Debug\CvGameCoreDLL.dll : fatal error LNK1120: 18 unresolved externals
1>NMAKE : fatal error U1077: '"C:/Program Files (x86)/Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\Cameron\Working Folder\CvGameCoreDLL\Debug\BuildLog.htm"
1>CvGameCoreDLL - 21 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
Same exact problem. I can compile a final release gamecore fine, but debug fails. This effects all RevDCM based mods because it's a problem with the latest RevDCM SVN. That's a large problem, because RevDCM is used as the core in RoM, LoR, Quote Capita, and Dune Wars to name a few. Glider told us to ask you EF, as he can't figure it out.

This is the error I get (assume it's the same as Afforess's):
Spoiler :
Code:
[plain]1> "C:\Program Files\Microsoft Visual C++ Toolkit 2003/bin/link.exe" /dll /nologo  /LIBPATH:Python24/libs /LIBPATH:boost-1.32.0/libs/ /LIBPATH:"C:\Program Files\Microsoft Visual C++ Toolkit 2003/lib" /LIBPATH:"C:\Program Files\Microsoft Platform SDK/Lib" /out:Debug\CvGameCoreDLL.dll  msvcprt.lib boost_python-vc71-mt-1_32.lib winmm.lib user32.lib  Debug\CvArea.obj Debug\CvArtFileMgr.obj Debug\CvBugOptions.obj Debug\CvCity.obj Debug\CvCityAI.obj Debug\CvDeal.obj Debug\CvDiploParameters.obj Debug\CvDLLButtonPopup.obj Debug\CvDLLEntity.obj Debug\CvDLLPython.obj Debug\CvDLLPythonEvents.obj Debug\CvDLLTranslator.obj Debug\CvDLLWidgetData.obj Debug\CvEventReporter.obj Debug\CvFractal.obj Debug\CvGame.obj Debug\CvGameAI.obj Debug\CvGameCoreDLL.obj Debug\CvGameCoreUtils.obj Debug\CvGameInterface.obj Debug\CvGameTextMgr.obj Debug\CvGlobals.obj Debug\CvHallOfFameInfo.obj Debug\CvInfoWater.obj Debug\CvInfos.obj Debug\CvInitCore.obj Debug\CvMap.obj Debug\CvMapGenerator.obj Debug\CvMessageControl.obj Debug\CvMessageData.obj Debug\CvPlayer.obj Debug\CvPlayerAI.obj Debug\CvPlot.obj Debug\CvPlotGroup.obj Debug\CvPopupInfo.obj Debug\CvPopupReturn.obj Debug\CvRandom.obj Debug\CvReplayInfo.obj Debug\CvReplayMessage.obj Debug\CvSelectionGroup.obj Debug\CvSelectionGroupAI.obj Debug\CvStatistics.obj Debug\CvStructs.obj Debug\CvTalkingHeadMessage.obj Debug\CvTeam.obj Debug\CvTeamAI.obj Debug\CvUnit.obj Debug\CvUnitAI.obj Debug\CvXMLLoadUtility.obj Debug\CvXMLLoadUtilityGet.obj Debug\CvXMLLoadUtilityInit.obj Debug\CvXMLLoadUtilitySet.obj Debug\CyArea.obj Debug\CyAreaInterface.obj Debug\CyArgsList.obj Debug\CyArtFileMgr.obj Debug\CyArtFileMgrInterface.obj Debug\CyCity.obj Debug\CyCityInterface1.obj Debug\CyCityInterface2.obj Debug\CyDeal.obj Debug\CyEnumsInterface.obj Debug\CyGame.obj Debug\CyGameCoreUtils.obj Debug\CyGameCoreUtilsInterface.obj Debug\CyGameInterface.obj Debug\CyGameTextMgr.obj Debug\CyGameTextMgrInterface.obj Debug\CyGlobalContext.obj Debug\CyGlobalContextInterface1.obj Debug\CyGlobalContextInterface2.obj Debug\CyGlobalContextInterface3.obj Debug\CyGlobalContextInterface4.obj Debug\CyHallOfFameInfo.obj Debug\CyHallOfFameInterface.obj Debug\CyInfoInterface1.obj Debug\CyInfoInterface2.obj Debug\CyInfoInterface3.obj Debug\CyMap.obj Debug\CyMapGenerator.obj Debug\CyMapGeneratorInterface.obj Debug\CyMapInterface.obj Debug\CyMessageControl.obj Debug\CyMessageControlInterface.obj Debug\CyPlayer.obj Debug\CyPlayerInterface1.obj Debug\CyPlayerInterface2.obj Debug\CyPlot.obj Debug\CyPlotInterface1.obj Debug\CyRandomInterface.obj Debug\CyReplayInfo.obj Debug\CySelectionGroup.obj Debug\CySelectionGroupInterface.obj Debug\CyStructsInterface1.obj Debug\CyTeam.obj Debug\CyTeamInterface.obj Debug\CyUnit.obj Debug\CyUnitInterface1.obj Debug\CvXMLLoadUtilityModTools.obj Debug\CvXMLLoadUtilitySetMod.obj Debug\FAssert.obj Debug\FDialogTemplate.obj Debug\_precompile.obj Debug\CxImage\general\tif_xfile.obj Debug\CxImage\general\ximabmp.obj Debug\CxImage\general\ximadsp.obj Debug\CxImage\general\ximaenc.obj Debug\CxImage\general\ximaexif.obj Debug\CxImage\general\ximage.obj Debug\CxImage\general\ximagif.obj Debug\CxImage\general\ximahist.obj Debug\CxImage\general\ximaico.obj Debug\CxImage\general\ximainfo.obj Debug\CxImage\general\ximaint.obj Debug\CxImage\general\ximaj2k.obj Debug\CxImage\general\ximajas.obj Debug\CxImage\general\ximajbg.obj Debug\CxImage\general\ximajpg.obj Debug\CxImage\general\ximalpha.obj Debug\CxImage\general\ximalyr.obj Debug\CxImage\general\ximamng.obj Debug\CxImage\general\ximapal.obj Debug\CxImage\general\ximapcx.obj Debug\CxImage\general\ximapng.obj Debug\CxImage\general\ximasel.obj Debug\CxImage\general\ximatga.obj Debug\CxImage\general\ximath.obj Debug\CxImage\general\ximatif.obj Debug\CxImage\general\ximatran.obj Debug\CxImage\general\ximawbmp.obj Debug\CxImage\general\ximawmf.obj Debug\CxImage\general\ximawnd.obj Debug\CxImage\general\xmemfile.obj Debug\CxImage\jpeg\jcapimin.obj Debug\CxImage\jpeg\jcapistd.obj Debug\CxImage\jpeg\jccoefct.obj Debug\CxImage\jpeg\jccolor.obj Debug\CxImage\jpeg\jcdctmgr.obj Debug\CxImage\jpeg\jchuff.obj Debug\CxImage\jpeg\jcinit.obj Debug\CxImage\jpeg\jcmainct.obj Debug\CxImage\jpeg\jcmarker.obj Debug\CxImage\jpeg\jcmaster.obj Debug\CxImage\jpeg\jcomapi.obj Debug\CxImage\jpeg\jcparam.obj Debug\CxImage\jpeg\jcphuff.obj Debug\CxImage\jpeg\jcprepct.obj Debug\CxImage\jpeg\jcsample.obj Debug\CxImage\jpeg\jctrans.obj Debug\CxImage\jpeg\jdapimin.obj Debug\CxImage\jpeg\jdapistd.obj Debug\CxImage\jpeg\jdatadst.obj Debug\CxImage\jpeg\jdatasrc.obj Debug\CxImage\jpeg\jdcoefct.obj Debug\CxImage\jpeg\jdcolor.obj Debug\CxImage\jpeg\jddctmgr.obj Debug\CxImage\jpeg\jdhuff.obj Debug\CxImage\jpeg\jdinput.obj Debug\CxImage\jpeg\jdmainct.obj Debug\CxImage\jpeg\jdmarker.obj Debug\CxImage\jpeg\jdmaster.obj Debug\CxImage\jpeg\jdmerge.obj Debug\CxImage\jpeg\jdphuff.obj Debug\CxImage\jpeg\jdpostct.obj Debug\CxImage\jpeg\jdsample.obj Debug\CxImage\jpeg\jdtrans.obj Debug\CxImage\jpeg\jerror.obj Debug\CxImage\jpeg\jfdctflt.obj Debug\CxImage\jpeg\jfdctfst.obj Debug\CxImage\jpeg\jfdctint.obj Debug\CxImage\jpeg\jidctflt.obj Debug\CxImage\jpeg\jidctfst.obj Debug\CxImage\jpeg\jidctint.obj Debug\CxImage\jpeg\jidctred.obj Debug\CxImage\jpeg\jmemmgr.obj Debug\CxImage\jpeg\jmemnobs.obj Debug\CxImage\jpeg\jquant1.obj Debug\CxImage\jpeg\jquant2.obj Debug\CxImage\jpeg\jutils.obj   /debug /NODEFAULTLIB:msvcprtd.lib /pdb:Debug\CvGameCoreDLL.pdb /INCREMENTAL /SUBSYSTEM:WINDOWS 
1>   Creating library Debug\CvGameCoreDLL.lib and object Debug\CvGameCoreDLL.exp
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_finish_decompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_read_scanlines referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_start_decompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_calc_output_dimensions referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_read_header referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_CreateDecompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_destroy_decompress referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_std_error referenced in function "public: bool __thiscall CxImageJPG::Decode(class CxFile *)" (?Decode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_resync_to_restart referenced in function "public: __thiscall CxImageJPG::CxFileJpg::CxFileJpg(class CxFile *)" (??0CxFileJpg@CxImageJPG@@QAE@PAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_finish_compress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_write_scanlines referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_start_compress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_simple_progression referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_set_quality referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_set_colorspace referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_set_defaults referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_CreateCompress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>ximajpg.obj : error LNK2019: unresolved external symbol _jpeg_destroy_compress referenced in function "public: bool __thiscall CxImageJPG::Encode(class CxFile *)" (?Encode@CxImageJPG@@QAE_NPAVCxFile@@@Z)
1>Debug\CvGameCoreDLL.dll : fatal error LNK1120: 18 unresolved externals
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\BST\src\Working\CvGameCoreDLL\Debug\BuildLog.htm"
1>CvGameCoreDLL - 21 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========[/plain]

I'm including the RevDCM source, including the makefile.
 
Take a look at the BULL makefile. Yes, I have totally restructured it, but the information should be in there. One difference I see is that these are the libs I use:

Code:
boost_python-vc71-mt-1_32.lib winmm.lib user32.lib [B]gdi32.lib Ole32.lib[/B]

For debug builds I add msvcprt.lib because it's added automatically during release builds.

Here are the libs from your makefile:

Code:
boost_python-vc71-mt-1_32.lib winmm.lib user32.lib msvcprt.lib

Try adding those two libs. I have no idea why a normal release would work if this is the problem, though. Try adding msvcprt.lib to your debug release as well.
 
This isn't fixing it for me. :(

And I need a Debug DLL, as I got a CTD in-game...
 
No change. Same errors exactly. (would I need to do a full rebuild since the libraries changed in the makefile?, if so that takes me over two hours to check :( )
 
Save your computers time Phungus, I just recompiled, and got the same errors again.
 
Since these are linking errors, there's no need to recompile. Just delete the CvGameCoreDLL.lib files before rebuilding. Given that you had errors, though, it probably wasn't even created.

I'm not sure what to say at this point. I never could get Refar's makefile to work for me. That's why I redid it for BULL. For one thing, it's a lot clearer to me, and there's less option duplication. Would it be possible to start with BULL's makefile and add to it the RevDCM source files rather than the other way around?

Here are the main differences:

  • Paths at top include path to Civ4/BTS
  • No need to copy boost and python libs/includes to your SDK folder; point to the original ones installed with BTS.
  • No project vs global options. We have one project, no use complicating things.
  • Commonalities between Debug and Final_Release extracted to general variables.
All you should need to do is set up the paths at the top, add build rules for the new cpp files, and add the new obj files to the xxx_OBJS variables.
 
I get this error in VC 2008 when trying to merge BULL into my own dll:
Code:
1>CvDLLWidgetData.obj : error LNK2019: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z) referenced in function "public: void __thiscall CvDLLWidgetData::parseHealthHelp(struct CvWidgetDataStruct &,class CvWStringBuffer &)" (?parseHealthHelp@CvDLLWidgetData@@QAEXAAUCvWidgetDataStruct@@AAVCvWStringBuffer@@@Z)

If I compile using CodeBlocks, I get no errors and a flawlessly working dll. Does anyone know how to get around this in VC 2008? I have up to this point been able to compile in both CB and VC without issues (for almost a year now), so this is a first...
 
getBugOptionBOOL() is a function in CvBugOptions.cpp. Make sure you add a build rule for CvBugOptions.obj and add it to the list of LINK_OBJS in the makefile for each build target.
 
We over at RevDCM are still unable to get a debug dll to compile using the cximage code. To get around that glider has cut the cximage source from the project, but this causes the advanced sentry icons to be removed. jdog5000 tried to build a makefile modeled on BULL's as a template, but no dice. The Final Release dll works fine, and the debug dll compiles using jdog's makefile, but it CTDs when trying to play, and when initializing python there are a slew of errors using the debug dll it creates (also the .pdb file is like 20 something MBs, whereas it should be around 70MB). I've included the RevDCM source with the working (but CxImage source removed) makefile, along with jdog's. EF, any chance you could look at this and see what is wrong with jdog's makefile? It almost works, it compiles, but the debug dll just doesn't work, also the final realease dll has no issues using it.
 
Why would the extra sentry icons not work? The CxImage library is used only for taking a screenshot from Python. I'll see what happens when I try to compile it here. Maybe there's still another library that I added that you don't have.
 
Back
Top Bottom