compiling problems

dudeabot

13-02-2008 14:47:07

im using the latest version on SVN and im getting tons of erros (vc 2005)


Compiling...
OGREAL_EXPORT
c1xx : fatal error C1083: Cannot open source file: 'OGREAL_EXPORT': No such file or directory
OgreALSoundManager.cpp
..\src\OgreALSoundManager.cpp(39) : error C2491: 'Ogre::Singleton<T>::ms_Singleton' : definition of dllimport static data member not allowed
with
[
T=OgreAL::SoundManager
]
..\src\OgreALSoundManager.cpp(47) : warning C4273: 'SOUND_FILE' : inconsistent dll linkage
f:\openal\include\OgreALSoundManager.h(194) : see previous definition of 'public: static std::basic_string<char,std::char_traits<char>,std::allocator<char> > const OgreAL::SoundManager::SOUND_FILE'


and much more, i can post if needed.. but i guess the root problem is

in


OGREAL_EXPORT
c1xx : fatal error C1083: Cannot open source file: 'OGREAL_EXPORT': No such file or directory
OgreALSoundManager.cpp


which i have no idea..

weird i had an older version and didnt have any problemes getting it to work

Beliar

18-02-2008 14:53:34

I got the inconsistent dll linkage error too.

Any ideas on how to solve that problem?

CaseyB

18-02-2008 18:20:40

OGREAL_EXPORT isn't a file, it's a define in OgreALPrereqs.h that allow Windows to find the classes in the dll. I don't know why it would be trying to open this like a file! Can you verify that your OgreALPrereqs.h looks good?

Beliar

18-02-2008 20:49:47

I only have the inconsistent dll linkage error. Nothing about OGREAL_EXPORT

It also worked before though. But after i got the newest version from the svn i got that message.

CaseyB

18-02-2008 21:37:13

Are these coming from building OgreAL or from building your project?

Beliar

19-02-2008 05:01:40

I get these when i try to build OgreAL.

I am using VC2005 Express and the Solution from the SVN.

stickymango

19-02-2008 08:56:08

I had this too I think, it was a conflicted project file in the OgreAL subdirectory, I had changed the paths and it had automatically added in a kind of patch line for the differences.

I deleted the lines out then opened the main project file in the OgreAL root directory, at least I'm sure thats what was causing it, it fixed the bad solution for OgreAL anyway!

CaseyB

19-02-2008 15:34:13

Thanks sticky, can you others try that and see it it works for you?

Beliar

19-02-2008 16:15:40

I am not sure what he meant but i just download everything again. And it works now.

There is a small chance, however, that it maybe because i opened OgreAL_VC2003.sln solution not knowing that OgreAL.sln can be opened by VC2005 without converting.

faylar

27-02-2008 09:15:50

I had this too I think, it was a conflicted project file in the OgreAL subdirectory, I had changed the paths and it had automatically added in a kind of patch line for the differences.

I deleted the lines out then opened the main project file in the OgreAL root directory, at least I'm sure thats what was causing it, it fixed the bad solution for OgreAL anyway!


Sorry, I don't really understand what you mean. Could someone evaluate? thanks :)

EDIT: I kinda managed to compile the libraries, for some reason VS8 ignores the error above after I tried compiling it the second time. When I try to include OgreAL into my applications though, I encountered 2 linker errors:

1>Linking...
1> Creating library C:\Libraries\OgreAL\Demos\Basic_Demo\Release\Basic_Demo.lib and object C:\Libraries\OgreAL\Demos\Basic_Demo\Release\Basic_Demo.exp
1>Listener.obj : error LNK2001: unresolved external symbol "protected: static class OgreAL::SoundManager * Ogre::Singleton<class OgreAL::SoundManager>::ms_Singleton" (?ms_Singleton@?$Singleton@VSoundManager@OgreAL@@@Ogre@@1PAVSoundManager@OgreAL@@A)
1>Listener.obj : error LNK2001: unresolved external symbol "protected: static class OgreAL::Listener * Ogre::Singleton<class OgreAL::Listener>::ms_Singleton" (?ms_Singleton@?$Singleton@VListener@OgreAL@@@Ogre@@1PAVListener@OgreAL@@A)
1>C:\Libraries\OgreAL\Demos\Basic_Demo\Release\Basic_Demo.exe : fatal error LNK1120: 2 unresolved externals


Any ideas?

EDIT2: Maybe it would be helpful to say that I am compiling on release. The libs are compiled in release too.

Thanks =)

faylar

stickymango

27-02-2008 12:06:29

I had edited the paths in my project files and when I updated the OgreAL folder it reported a conflict with the OgreAL.proj file. When I looked at this file it had inserted lines showing the differences between my paths and the SVN paths, I deleted my paths out and saved it again and the project loaded fine.

Does that make sense? probably not the issue but its something that happened to me, and I vaguely remember seeing the OGREAL_EXPORT error...

S_W

01-03-2008 04:15:18

I've got the same errors when compiling under VS 2005 and was able to resolve them by removing the OGRE_SRC und BOOST_ROOT paths from the "C/C++" and "Linker" include directories (I'm using the SDK).

Doesn't make sense to me but it worked :)

CaseyB

01-03-2008 23:01:24

Yeah, that doesn't make any sense. If it can't find the environment variable it should just ignore it. Maybe it just causes the project to refresh or something! I don't know!

pra

02-03-2008 15:44:09

I had the same problem after updating from SVN, and that worked for me, too. thx^^

btw it gets even stranger, I got this warning:
Project : warning PRJ0018 : The following environment variables were not found:
$(OPENAL_SDK)

why does it compile if it can't find the openal_sdk?
(i just added the var and compiling again, just to be sure)

kungfoomasta

05-03-2008 07:36:59

At first I thought my computer had gremlins in it, but I'm getting the same error as everybody else! Something in the last few commits caused this problem. I'm using vs2005 professional.

was able to resolve them by removing the OGRE_SRC und BOOST_ROOT paths from the "C/C++" and "Linker" include directories (I'm using the SDK).

This did the trick for me also.. so odd! :shock:

reptor

05-03-2008 12:39:57

I compiled OgreAL with Visual C++ Express 2008 just a few days ago, and yes I had that problem too and I solved it by removed the unneeded paths and it started working.

...but at first I had more problems, as I thought I need to use the "OgreALVC9.sln" but it's broken! If I had longer hair I would have been pulling it out! Until I finally understood to try "OgreAL.sln" and noticed that it indeed was for an older version but it had more correct settings.

I could make the project settings from scratch by myself too, and in fact I was doing that until I found the other solution file and got it fixed with smaller effort... but in the process I was cursing "to hell with open-source" et cetera... No offense, anyone :lol: just got a bit annoyed when the VC9 solution file didn't look like it could have been working in the first place (at least for the demos, not at all).

Black'Tea

14-03-2008 16:14:54

I had the same weird problem with VC 2005 Express and removing the unnecessary pathes helps. But I got an error in this function:

struct SoundManager::UpdateSound
{
void operator()(std::pair<std::string, Sound*> pair)const
{
pair.second->updateSound();
}
};


I made updateSound public and it works.

.overlord.

02-05-2008 20:04:16

weirdly
this seems to happen if your BOOST_ROOT isn't set
or if you don't have boost in your vs project paths

i recently removed mine and started getting these problems
set the env var and it worked

metaldev

30-05-2008 06:18:51

I've got the same errors when compiling under VS 2005 and was able to resolve them by removing the OGRE_SRC und BOOST_ROOT paths from the "C/C++" and "Linker" include directories (I'm using the SDK).

Doesn't make sense to me but it worked :)


i was having the same exact issue with the 'OGREAL_EXPORT' what S_W suggested is what worked for me.