Page 3 of 3

Re: Compiling with Code::Blocks, part deux

Posted: Thu Sep 16, 2010 9:27 pm
by klauss
The only thing left to try is (VSSprite*)NULL.

But that's just dumb on MSVC's part.

Re: Compiling with Code::Blocks, part deux

Posted: Thu Sep 16, 2010 9:35 pm
by shenle
klauss wrote:The only thing left to try is (VSSprite*)NULL.

But that's just dumb on MSVC's part.
That actually worked. Everything compiles without errors.

But now of course I get several hundred unresolved externals because I didn't include any of the new audio stuff in the project yet. :D

Re: Compiling with Code::Blocks, part deux

Posted: Thu Sep 16, 2010 9:37 pm
by shenle
Here's an updated patch. use instead of the previous one.

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 5:23 pm
by shenle
I'm trying to clean up the VS projects, and noticed that they contain the cmd/collide folder as well as cmd/collide2; but there is no cmd/collide in the source tree. OK to nuke that?

Also, cmd/iterator.h absent. Ok to nuke?

3rd; am I right toassume that the following files should not be included in the project directly?
gfx/bmp_to_png.cpp
gfx/raw_to_png.cpp
cmd/unit_jump.cpp
cmd/ai/pythonai.cpp
cmd/oldcollection.cpp


Finally, what am I missing? This is my current output (see attached lest it exceeds max message size)

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 6:18 pm
by klauss
shenle wrote:I'm trying to clean up the VS projects, and noticed that they contain the cmd/collide folder as well as cmd/collide2; but there is no cmd/collide in the source tree. OK to nuke that?

Also, cmd/iterator.h absent. Ok to nuke?
If the source is missing, it's ok I would think.
shenle wrote: 3rd; am I right toassume that the following files should not be included in the project directly?
gfx/bmp_to_png.cpp
gfx/raw_to_png.cpp
cmd/unit_jump.cpp
cmd/ai/pythonai.cpp
cmd/oldcollection.cpp
You're correct, they're not in CMakeLists.txt, so linux isn't using them, I can't think of a reason for windows to want them either.

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 6:19 pm
by klauss
shenle wrote:Finally, what am I missing? This is my current output (see attached lest it exceeds max message size)
You need to include unit.cpp, which is no longer included in unit.h.

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 7:31 pm
by shenle
klauss wrote:
shenle wrote:Finally, what am I missing? This is my current output (see attached lest it exceeds max message size)
You need to include unit.cpp, which is no longer included in unit.h.
unit.cpp is already included, as well as unit.h.

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 8:37 pm
by klauss
Are you sure?

Take a good look. I remember it was marked as "do not build this file" (or something like that).

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 8:46 pm
by shenle
You're right. I'm not all that familiar with VS10, having used mostly C::B and VS7 in the past so I missed that.
Building now.

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 8:51 pm
by shenle

Code: Select all

1>OpenALRenderer.obj : error LNK2019: unresolved external symbol __imp__alSpeedOfSound referenced in function "protected: void __thiscall Audio::OpenALRenderer::setupDopplerEffect(void)" (?setupDopplerEffect@OpenALRenderer@Audio@@IAEXXZ)
1>unit_generic.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall UnitImages<void>::~UnitImages<void>(void)" (??1?$UnitImages@X@@UAE@XZ) referenced in function "public: virtual void * __thiscall UnitImages<void>::`scalar deleting destructor'(unsigned int)" (??_G?$UnitImages@X@@UAEPAXI@Z)
last 2 errors remaining.

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 9:04 pm
by klauss
That means you're using a new al.h but an old al.lib/dll

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 9:06 pm
by shenle
klauss wrote:That means you're using a new al.h but an old al.lib/dll
I'm using both from vega-vc7, supposedly they're the same version.

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 9:58 pm
by shenle
I have downloaded and compiled OpenAL from svn, and replaced all the headers and libs with the new versions. I still get

Code: Select all

1>OpenALRenderer.obj : error LNK2019: unresolved external symbol __imp__alSpeedOfSound referenced in function "protected: void __thiscall Audio::OpenALRenderer::setupDopplerEffect(void)" (?setupDopplerEffect@OpenALRenderer@Audio@@IAEXXZ)
1>unit_generic.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall UnitImages<void>::~UnitImages<void>(void)" (??1?$UnitImages@X@@UAE@XZ) referenced in function "public: virtual void * __thiscall UnitImages<void>::`scalar deleting destructor'(unsigned int)" (??_G?$UnitImages@X@@UAEPAXI@Z)

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 10:02 pm
by klauss
It's just common sense: if the call was wrong (which it isn't), the compiler would complain, not the linker.

The fact that it's the linker complaining hints that the .h has the function's declaration, but the .lib doesn't have the function itself.

So... I'll urge you to keep digging ;)

Re: Compiling with Code::Blocks, part deux

Posted: Fri Sep 17, 2010 10:08 pm
by shenle
I would dig, but don't know where anymore. I'm not a programmer (duh!)