MSVCRT.lib(crtexe.obj) : error LNK2019
rubenhonders
11-05-2007 21:33:35
Hey guys im trying compile the tutorials from nxogre my first error was
error C2065: 'SET_TERM_HANDLER' : undeclared identifier
but after delete that function im getting this error
MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
im am using:
PhysX_2.6.2_SDK_Core
visual c++ 2005 express
nxogre 0.4 RC 3
betajaen
11-05-2007 21:37:31
Take out the SET_TERM_HANDLER line, it's not used in Eihort anymore. The second part is a bit of a mystery. You haven't been fiddling around with the project settings have you?
rubenhonders
11-05-2007 21:45:39
No i haven't so far i can see
rubenhonders
12-05-2007 22:19:29
Still i am get this problem
betajaen
12-05-2007 22:26:16
There's definitely a "void main" there, you could take it out of the macro and put it in the Tutorial.cpp but it defeats the point. Try it anyway, and see if that's the problem.
rubenhonders
13-05-2007 14:34:54
I gonna try it today
rubenhonders
13-05-2007 14:59:49
i've added
int main(int argc, char *argv[]) {
try {
NxTutorial* d = new NxTutorial();
d->Run();
d->Shutdown();
delete d;
} catch( Ogre::Exception& e ) {
std::cout << "An exception has occured: " << e.getFullDescription().c_str() << std::endl;
}
std::cout << "--Done." << std::endl;
return 0;
}
into my code but now im getting this
Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..."
betajaen
13-05-2007 16:13:10
It probably couldn't copy the .exe to the tutorials directory. I assume you copied the contents of the tutorials zip to $NXOGRE_DIR/tutorials/ ?
rubenhonders
13-05-2007 20:55:32
Sry but im not understant you
betajaen
13-05-2007 21:06:12
As do I.
What I meant is; When you unzipped the tutorials.zip you unzipped it into a tutorial folder in the NxOgre folder?
rubenhonders
13-05-2007 21:12:13
Yes mij tutorials is in nxogre\tutorials
betajaen
13-05-2007 21:13:38
Did you setup the NXOGRE_DIR environmental variable?
rubenhonders
13-05-2007 21:18:05
yes
betajaen
13-05-2007 21:38:21
Alright, it's not really an error, it just means it couldn't copy the compiled exe to the tutorials directory for some reason; If you copy it from \tutorials\NxTutorials\VC8\<Release/Debug> to \tutorials\ it'll be fine.
Post-Builds events errors can also happen when you have Whitespaces on your directory name. So if you have on your post-build event something like:
"copy $NXOGREDIR\Tutorials\Debug..."
And your $NXOGREDIR variable points to a directory named: "Ogre\Nx Ogre\", then an error is going to happen. Nothing biggie. But I also cracked my skull to find that out. Damn windows...
Sokka06
14-05-2007 16:11:58
I have exactly same problem and still haven't got it working
betajaen
14-05-2007 16:22:19
It's barely a problem, it just can't copy the compiled executable to the tutorials for you, due to a path or environmental variable conflict.
rubenhonders
14-05-2007 19:49:42
i have cheked everything but i dont see any problem :S
rubenhonders
14-05-2007 20:03:14
my variable
NXOGRE_DIR = D:\ogrenew\NxOgre
my addition include directories =
"$(NXOGRE_DIR)\Tutorials\NxTutorials\Common\";"$(OGRE_HOME)\include\";"$(OGRE_HOME)\..\Dependencies\include";"$(PHYSX_DIR)\SDKs\PhysXLoader\include";"$(PHYSX_DIR)\SDKs\Physics\include";"$(PHYSX_DIR)\SDKs\Foundation\include";"$(PHYSX_DIR)\SDKs\Cooking\include";"$(PHYSX_DIR)\SDKs\NxCharacter\include";"$(NXOGRE_DIR)\include"
output file = $(OutDir)/nxTutorial101.exe
additional library directories =
"$(NXOGRE_DIR)\compiler\NxOgre.VC8\$(ConfigurationName)\lib";"$(OGRE_HOME)\lib";"$(OGRE_HOME)\lib\$(ConfigurationName)\";"$(OGRE_HOME)\..\Dependencies\lib\$(ConfigurationName)\";"$(PHYSX_DIR)\SDKs\lib\win32\";"$(PHYSX_DIR)\SDKs\Physics\lib\win32\Release";"$(PHYSX_DIR)\SDKs\Cooking\lib\win32\Release";"$(PHYSX_DIR)\SDKs\NxCharacter\lib\win32\Release"
betajaen
14-05-2007 20:10:31
It's an odd problem, but can't you just copy the NxTutorial101.exe by yourself?
rubenhonders
14-05-2007 20:38:07
no , because the .exe is not builded thanks by that problem
betajaen
14-05-2007 20:39:18
Well show us the compile log then.
rubenhonders
14-05-2007 21:08:36
Sry i was looking in the rong folder
*noob*
but now im getting something else if i run the exe im getting a black dos prompt and in a fraction of a second it go's away , i cant see what the dos prompt is telling
betajaen
14-05-2007 21:09:57
You can open a DOS prompt, cd to the directory and run it. It'll print what ever it says in there.
rubenhonders
14-05-2007 21:22:44
ty , it say's
An exception has accored: OGRE EXCEPTION<6:FileNotFoundException>:
'config.yaml'
file not found! in ConfigFile::load at ..\src\OgreConfigFile.cpp <line 84>
--done
rubenhonders
14-05-2007 21:38:50
okay i have copied config.yaml and some other files to the .exe and it works now
thank you im up and running