o'Fusion Loader o'Headache

clutch43

26-12-2006 11:56:47

Compiling...
oSceneLibDemo.cpp
Compiling manifest to resources...
Linking...
LINK : fatal error LNK1104: cannot open file '..\obj\Debug\OgreOSMScene.obj'
Build log was saved at "file://d:\Projects\Ogre\OgreSDK\samples\obj\Debug\BuildLog.htm"
Demo_oSceneLoader - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Sorry about rehashing this subject., i have searched this forum for help on this..can anybody supply me with a reason/and/or solution to this..I have actually had it working at one point...but now i just have an o'Headache.
Thank you all in advance,,,,and Merry Xmas to All.

RobSegal

27-12-2006 07:43:12

Hey clutch it's tough for me to tell exactly what's going on here but it seems your linker can't find the intermediate .obj files for performing proper linkage on your project. You could try a rebuild all and see if that fixes things. Have you move any folders around recently in your development folder? How did you create the project which you are building?

I may have set things up different from you. I downloaded the demo app from this page...

http://www.ofusiontechnologies.com/downloads.html

Then created an empty project and with some hardcoding and hacks built the demo app. Is this similar to what you did?

clutch43

27-12-2006 17:06:32

Hi Rob,
That was my problem exactly., i had moved folders around, first had it set up on myWorkDir on D:,,,what i did was move folder over to VC++Express projects folder in my Documents,.it fired right up then with no errors in debug., release has 1 error (BOOL).and will not build.( can post error if u wish.,i have just been trying to find solution in forums....but will rebuild it and get build log to paste here next few hrs.

thanks for your reply.
:)

clutch43

27-12-2006 17:55:19

here are the errors i get in release,.builds ok in debug.

Output Window Compiling...
OgreOSMScene.cpp
d:\Documents and Settings\Administrator.MYSYS1\My Documents\Visual Studio 2005\Projects\loadertest1\include\OgreOSMScene.h(78) : error C2061: syntax error : identifier 'BOOL'
.\src\OgreOSMScene.cpp(176) : error C2065: 'BOOL' : undeclared identifier
.\src\OgreOSMScene.cpp(176) : error C2146: syntax error : missing ';' before identifier 'bHandled'
.\src\OgreOSMScene.cpp(176) : error C2065: 'bHandled' : undeclared identifier
.\src\OgreOSMScene.cpp(176) : error C2065: 'FALSE' : undeclared identifier
.\src\OgreOSMScene.cpp(507) : error C2061: syntax error : identifier 'BOOL'
.\src\OgreOSMScene.cpp(604) : error C2065: 'TRUE' : undeclared identifier
oSceneLibDemo.cpp
d:\documents and settings\administrator.mysys1\my documents\visual studio 2005\projects\loadertest1\include\OgreOSMScene.h(78) : error C2061: syntax error : identifier 'BOOL'
tinystr.cpp
tinyxml.cpp

one solution for a way around error was this
" Solution:

To solve this issue, you can ( did not work)

1. add a "typedef int BOOL;" on any place at the top of the
"OgreOSMScene.h" file..(
or
2. change all "BOOL" with "bool" on the "OgreOSMScene.h" and
"OgreOSMScene.cpp" files

all i did was paste "typedef int BOOL;" into the "OgreOSMScene.h" file,,possibly i am missing something here,,,placement?, incomplete?

Also please be aware.,i consider myself a newbie., not much expeirence in
VC++,Ogre,oFusion.,,but am learning..,slowly,and with errors,. lol.

RobSegal

28-12-2006 04:12:52

Well I'm sure you're likely to get more errors but you can solve your initial problem by adding...

#include <windows.h>

to OgreOSMScene.h . I believe BOOL is a windows defined data type which really just translates down to an integer. However because the example code off of the oFusion website doesn't have files setup as a project some hackery is necessary to get things running. Anyways back to the solution... add the "include" line near the type of that header file. Right below these preprocessor directives (ifndef/define)...


#ifndef __OGRE_XML_SCENE__
#define __OGRE_XML_SCENE__

#include <windows.h>


You're likely to get more errors as I did but lets take one step at a time. Tell me if this solution works for you and if you get any new errors.

I tried your solution as well (using the typedef int BOOL) at first. Although as development note you could have used...

#define BOOL bool

instead of replacing all BOOL's to bool. That would've had the same effect. When I attempted the solution you are talking of I received errors like "BOOL is already defined, redecleration". Maybe you got something similar?

Don't worry if you're new to development. If you're willing to learn the knowledge is available and there are people there to help you. You'll get the occasional insulting rube but that don't let that discourage you.

clutch43

28-12-2006 11:11:14

HiRob,
and thanks for your help., you nailed it right on...added #include <windows.h> to OgreOSMScene.h file and now able to build release.,and no errors ( or warnings). Thanks again,you saved me alot of head scratching. Now that i have this all setup and working properly i can get down to the nitty gritty. ( more reading...lol)...Hope you check here every once and awhile.,you have been a great help., Thanks again Rob.

RobSegal

28-12-2006 23:48:47

Yeh I'll be around clutch. I just started messing around with oFusion so I will no doubt have some questions of my own. Glad I could be of some help.