error PRJ0019 compiling CaelumDemo

hellzakk

27-05-2009 09:42:56

Hi all, ive downloaded caelum 0.4 and ive compile the Caelum_vs9.sln to get "caelum_d.dll" "caelum_d.ilk" and "caelum_d.pdb".
When i try to compile the example CaelumDemo_vs9.sln i get the error PRJ0019

this is the log

Log di compilazione


Ricompila avviata: progetto: CaelumDemo, configurazione: Debug|Win32

Righe di comando


Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000910403064.rsp" con contenuto
[
/Od /I "include" /I "../main/include" /I "E:\OgreSDK/include" /D "DEBUG" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Gy /Fo"..\samples\out\\" /Fd"..\samples\out\vc90.pdb" /W3 /c /ZI /TP ".\src\CaelumDemo.cpp"
]
Creazione riga di comando "cl.exe @"e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000910403064.rsp" /nologo /errorReport:prompt"
Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\TMP00000A10403064.tmp" con contenuto
[
1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ ".\\out\\caelumtest1_d.exe.embed.manifest"
]
Creazione riga di comando "rc.exe /fo".\out\caelumtest1_d.exe.embed.manifest.res" "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\TMP00000A10403064.tmp""
Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000B10403064.rsp" con contenuto
[
/OUT:"..\samples\out/caelumtest1_d.exe" /INCREMENTAL /LIBPATH:"../lib/debug" /LIBPATH:"E:\OgreSDK/lib" /MANIFEST /MANIFESTFILE:"..\samples\out\caelumtest1_d.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"..\samples\out/caelumtest1_d.pdb" /SUBSYSTEM:CONSOLE /ENTRY:"mainCRTStartup" /DYNAMICBASE:NO /MACHINE:X86 caelum_d.lib OgreMain_d.lib OIS_d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

".\out\CaelumDemo.obj"

".\out\caelumtest1_d.exe.embed.manifest.res"
]
Creazione riga di comando "link.exe @"e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000B10403064.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000C10403064.rsp" con contenuto
[
/out:".\out\caelumtest1_d.exe.embed.manifest" /notify_update /manifest

".\out\caelumtest1_d.exe.intermediate.manifest"
]
Creazione riga di comando "mt.exe @"e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000C10403064.rsp" /nologo"
Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\BAT00000D10403064.bat" con contenuto
[
@echo Ultimo aggiornamento della risorsa di manifesto alle %TIME% il %DATE% > ".\out\mt.dep"
]
Creazione riga di comando """e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\BAT00000D10403064.bat"""
Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\TMP00000E10403064.tmp" con contenuto
[
1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ ".\\out\\caelumtest1_d.exe.embed.manifest"
]
Creazione riga di comando "rc.exe /fo".\out\caelumtest1_d.exe.embed.manifest.res" "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\TMP00000E10403064.tmp""
Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000F10403064.rsp" con contenuto
[
/OUT:"..\samples\out/caelumtest1_d.exe" /INCREMENTAL /LIBPATH:"../lib/debug" /LIBPATH:"E:\OgreSDK/lib" /MANIFEST /MANIFESTFILE:"..\samples\out\caelumtest1_d.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"..\samples\out/caelumtest1_d.pdb" /SUBSYSTEM:CONSOLE /ENTRY:"mainCRTStartup" /DYNAMICBASE:NO /MACHINE:X86 caelum_d.lib OgreMain_d.lib OIS_d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

".\out\CaelumDemo.obj"

".\out\caelumtest1_d.exe.embed.manifest.res"
]
Creazione riga di comando "link.exe @"e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\RSP00000F10403064.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Creazione file temporaneo "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\BAT00001010403064.bat" con contenuto
[
@echo off

"E:\Caelum-0.4.0\Caelum-0.4.0\samples\/samples/PostBuild.bat" "e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\" "Debug" "..\samples\out\caelumtest1_d.exe" "E:\OgreSDK\bin\Debug"

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: Uno strumento ha restituito un codice di errore da "Evento di post-compilazione in corso..."

exit 1

:VCEnd
]
Creazione riga di comando """e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\BAT00001010403064.bat"""

Finestra di output


Compilazione in corso...
CaelumDemo.cpp
Compilazione del manifesto nelle risorse in corso...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Collegamento in corso...
Incorporamento del manifesto in corso...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Evento di post-compilazione in corso...
Impossibile trovare il percorso specificato.
Project : error PRJ0019: Uno strumento ha restituito un codice di errore da "Evento di post-compilazione in corso..."

Risultati


Il log di compilazione รจ stato salvato in 'file://e:\Caelum-0.4.0\Caelum-0.4.0\samples\out\BuildLog.htm'
CaelumDemo - 1 errore/i, 0 avviso/i


EDIT

ok, i've edited the resources.cfg and now work, but when the build start popup the selection render of ogre without any option...
i have already set the working directory where the exe where created...
any suggestion?

cdleonard

27-05-2009 14:59:13

PostBuild.bat fails somehow; but I can't understand the log. It does a lot more than just write resource.cfg; it also writes plugins.cfg and copies dlls from ogre. You can read try to read PostBuild.bat and so what that file does manually.

It might help if you set your languange to english.

hellzakk

27-05-2009 21:09:31

this is postbuild.bat

setlocal
set TargetDir=%1
set Config=%2

echo "Copying stuff from %OGRE_HOME% to %TargetDir% %1, config %Config%"

IF /i %Config%=="Debug" (
copy /Y "%OGRE_HOME%\bin\debug\OgreMain_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\OIS_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\cg.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\OgreGUIRenderer_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\CEGUIBase_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\CEGUIExpatParser_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\CEGUIFalagardWRBase_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\RenderSystem_Direct3D9_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\RenderSystem_GL_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\Plugin_CgProgramManager_d.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\debug\Plugin_OctreeSceneManager_d.dll" %TargetDir%

del %TargetDir%plugins.cfg
echo PluginFolder=. >> %TargetDir%plugins.cfg
echo Plugin=Plugin_CgProgramManager_d >> %TargetDir%plugins.cfg
echo Plugin=Plugin_OctreeSceneManager_d >> %TargetDir%plugins.cfg
echo Plugin=RenderSystem_GL_d >> %TargetDir%plugins.cfg
echo Plugin=RenderSystem_Direct3D9_d >> %TargetDir%plugins.cfg
) else (
copy /Y "%OGRE_HOME%\bin\release\OgreMain.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\OIS.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\cg.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\OgreGUIRenderer.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\CEGUIBase.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\CEGUIExpatParser.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\CEGUIFalagardWRBase.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\RenderSystem_Direct3D9.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\RenderSystem_GL.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\Plugin_CgProgramManager.dll" %TargetDir%
copy /Y "%OGRE_HOME%\bin\release\Plugin_OctreeSceneManager.dll" %TargetDir%

del %TargetDir%plugins.cfg
echo PluginFolder=. >> %TargetDir%plugins.cfg
echo Plugin=Plugin_CgProgramManager >> %TargetDir%plugins.cfg
echo Plugin=Plugin_OctreeSceneManager >> %TargetDir%plugins.cfg
echo Plugin=RenderSystem_GL >> %TargetDir%plugins.cfg
echo Plugin=RenderSystem_Direct3D9 >> %TargetDir%plugins.cfg
)

del %TargetDir%resources.cfg
echo [Bootstrap] >> %TargetDir%resources.cfg
echo Zip=..\..\samples\resources\OgreCore.zip >> %TargetDir%resources.cfg

echo [Caelum] >> %TargetDir%resources.cfg
echo FileSystem=..\..\main\resources\ >> %TargetDir%resources.cfg
echo FileSystem=..\..\samples\resources\ >> %TargetDir%resources.cfg

echo [CEGUI] >> %TargetDir%resources.cfg
echo FileSystem=..\..\samples\resources\gui\ >> %TargetDir%resources.cfg

endlocal


ogre.log
23:21:38: Creating resource group General
23:21:38: Creating resource group Internal
23:21:38: Creating resource group Autodetect
23:21:38: SceneManagerFactory for type 'DefaultSceneManager' registered.
23:21:38: Registering ResourceManager for type Material
23:21:38: Registering ResourceManager for type Mesh
23:21:38: Registering ResourceManager for type Skeleton
23:21:38: MovableObjectFactory for type 'ParticleSystem' registered.
23:21:38: OverlayElementFactory for type Panel registered.
23:21:38: OverlayElementFactory for type BorderPanel registered.
23:21:38: OverlayElementFactory for type TextArea registered.
23:21:38: Registering ResourceManager for type Font
23:21:38: ArchiveFactory for archive type FileSystem registered.
23:21:38: ArchiveFactory for archive type Zip registered.
23:21:38: FreeImage version: 3.10.0
23:21:38: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
23:21:38: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
23:21:38: DDS codec registering
23:21:38: Registering ResourceManager for type HighLevelGpuProgram
23:21:38: Registering ResourceManager for type Compositor
23:21:38: MovableObjectFactory for type 'Entity' registered.
23:21:38: MovableObjectFactory for type 'Light' registered.
23:21:38: MovableObjectFactory for type 'BillboardSet' registered.
23:21:38: MovableObjectFactory for type 'ManualObject' registered.
23:21:38: MovableObjectFactory for type 'BillboardChain' registered.
23:21:38: MovableObjectFactory for type 'RibbonTrail' registered.
23:21:38: OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in ConfigFile::load at f:\codingextra\ogre\shoggoth_vc9\ogre\ogremain\src\ogreconfigfile.cpp (line 84)
23:21:38: plugins.cfg not found, automatic plugin loading disabled.
23:21:38: *-*-* OGRE Initialising
23:21:38: *-*-* Version 1.6.2 (Shoggoth)
23:21:38: Creating resource group Bootstrap
23:21:38: Added resource location 'resources/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
23:21:38: Added resource location 'resources' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/own_shaders' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/meshes' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/gui' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/fonts' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/overlays' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/materials/programs' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/materials/scripts' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/materials/textures' of type 'FileSystem' to resource group 'General'
23:21:38: Added resource location 'media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
23:21:38: Added resource location 'media/packs/skybox.zip' of type 'Zip' to resource group 'General'
23:21:38: OGRE EXCEPTION(6:FileNotFoundException): 'ogre.cfg' file not found! in ConfigFile::load at f:\codingextra\ogre\shoggoth_vc9\ogre\ogremain\src\ogreconfigfile.cpp (line 84)
23:21:41: *-*-* OGRE Shutdown
23:21:41: Unregistering ResourceManager for type Compositor
23:21:41: Unregistering ResourceManager for type Font
23:21:41: Unregistering ResourceManager for type Skeleton
23:21:41: Unregistering ResourceManager for type Mesh
23:21:41: Unregistering ResourceManager for type HighLevelGpuProgram
23:21:41: Unregistering ResourceManager for type Material


OGRE EXCEPTION(6:FileNotFoundException): 'ogre.cfg' file not found! in ConfigFile::load at f:\codingextra\ogre\shoggoth_vc9\ogre\ogremain\src\ogreconfigfile.cpp (line 84)
how i can fix it? :?

EDIT : ok i've fix it, but now i got problem with this instruction
mRoot = new Root(mResourcePath + "plugins.cfg",
mResourcePath + "ogre.cfg", mResourcePath + "Ogre.log");

dredogol

30-05-2009 23:57:12

I tried compiling the DEMO program from the repository and this is what I got:
1>------ Rebuild All started: Project: CaelumDemo, Configuration: Release Win32 ------
1>Deleting intermediate and output files for project 'CaelumDemo', configuration 'Release|Win32'
1>Compiling...
1>CaelumDemo.cpp
1>Linking...
1>Embedding manifest...
1>Performing Post-Build Event...
1>The system cannot find the path specified.
1>Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."
1>Build log was saved at "file://c:\OgreSDK\Caelum_SVN\obj\release\BuildLog.htm"
1>CaelumDemo - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Of course, I had to go dig for the Caelum.lib and Caelum_d.lib files from the repository to reach this step.

Does anyone know how to fix this post-build error?

My Build Log is this:
Creating temporary file "c:\OgreSDK\Caelum_SVN\obj\release\RSP00000B23163888.rsp" with contents
[
/O2 /I "include" /I "../main/include" /I "c:\OgreSDK/include" /D "NDEBUG" /D "_MBCS" /GF /FD /EHsc /MD /Gy /Fo"../obj/release\\" /Fd"../obj/release\vc90.pdb" /W3 /c /TP .\src\CaelumDemo.cpp
]
Creating command line "cl.exe @c:\OgreSDK\Caelum_SVN\obj\release\RSP00000B23163888.rsp /nologo /errorReport:prompt"
Creating temporary file "c:\OgreSDK\Caelum_SVN\obj\release\RSP00000C23163888.rsp" with contents
[
/OUT:"../bin/release/caelumtest1.exe" /INCREMENTAL:NO /LIBPATH:"C:\OgreSDK\Caelum_SVN\lib" /LIBPATH:"../lib/release" /LIBPATH:"c:\OgreSDK/lib" /MANIFEST /MANIFESTFILE:"../obj/release\caelumtest1.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /ENTRY:"mainCRTStartup" /DYNAMICBASE:NO /MACHINE:X86 caelum.lib OgreMain.lib OIS.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

"..\obj\release\CaelumDemo.obj"
]
Creating command line "link.exe @c:\OgreSDK\Caelum_SVN\obj\release\RSP00000C23163888.rsp /NOLOGO /ERRORREPORT:PROMPT"
Creating temporary file "c:\OgreSDK\Caelum_SVN\obj\release\RSP00000D23163888.rsp" with contents
[
/outputresource:"..\bin\release\caelumtest1.exe;#1" /manifest

..\obj\release\caelumtest1.exe.intermediate.manifest
]
Creating command line "mt.exe @c:\OgreSDK\Caelum_SVN\obj\release\RSP00000D23163888.rsp /nologo"
Creating temporary file "c:\OgreSDK\Caelum_SVN\obj\release\BAT00000E23163888.bat" with contents
[
@echo Manifest resource last updated at %TIME% on %DATE% > ..\obj\release\mt.dep
]
Creating command line "c:\OgreSDK\Caelum_SVN\obj\release\BAT00000E23163888.bat"
Creating temporary file "c:\OgreSDK\Caelum_SVN\obj\release\BAT00000F23163888.bat" with contents
[
@echo off

"C:\OgreSDK\Caelum_SVN\samples\/samples/PostBuild.bat" "c:\OgreSDK\Caelum_SVN\bin\release\" "Release"

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."

exit 1

:VCEnd
]
Creating command line "c:\OgreSDK\Caelum_SVN\obj\release\BAT00000F23163888.bat"

dredogol

31-05-2009 15:33:48

Alright, I manged to fix the error, and this fix also applies to the post:
[Solved] Problem Compiling Caelum v0.4 originally by dredogol
http://www.ogre3d.org/addonforums/viewtopic.php?f=21&t=10167

You need to change your MAIN() function, because it is old, and we're using C++. The IDE / compiler doesn't like the C version I guess...
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"

INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
#else
int main(int argc, char **argv)
#endif
{
try
{
CaelumSampleApplication app;
app.go ();
}
catch(std::exception& e)
{
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBoxA(NULL, e.what(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occurred: %s\n", e.getFullDescription().c_str());
#endif
}

return 0;
}

cdleonard

31-05-2009 17:31:29

I'm utterly confused. What compiler are you using? It seems you made your own project files; that's OK.

The included vcproj files should work with VS 2005 and 2008 out of the box (they find the ogre SDK based on OGRE_HOME). If you make your own you should expect various annoyingly small problems. I'm glad you could solve them.

I believe the included vcproj files contained a switch to allow "int main" instead of "INT WINAPI WinMain"; but you didn't include that switch when you made your own vcproj. The CaelumDemo stuff is not meant to be included in an external project anyway; you're expected to write your own main. The samples are messy.

I'm don't think this is related to the "PRJ0019 message"; that seems to be a harmless error from "PostBuild.bat". Harmless error are harmfully confusing.

I'm also not sure it's related to the compilation errors you posted in the original topic. Those seem to be dllimport/dllexport mismatches. You can read more about those directives on msdn. If you build the whole thing in one executable (no dlls) you must make sure CAELUM_EXPORT is not defined to anything (or you get linker errors).