daeArray::removeIndex Link error

I’m coding an importer using the RT 1.4 as a guide and I keep getting this link error. I’ve worked around a coupleof them, but now I get it on declaring-
domFx_color_common color;
which leaves me stuck. This function is defined in the headers.

I’m using the precompiled Windows dll and lib for testing before I try to add the collada compile into the app.

Any suggestions?

David

can you post the actual link error message. It would help.

Thanks,
-Andy

The error -

Linking…
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
Creating library Release/ToolBox.lib and object Release/ToolBox.exp
ExpCollada.obj : error LNK2001: unresolved external symbol “public: virtual __int32 __thiscall daeArray::removeIndex(unsigned int)” (?removeIndex@daeArray@@UAE_HI@Z)
Release/ToolBox.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I had seen it before and changed the code to not make the offending call,
but now I get it on -
domFx_color_common color;

So I’m stuck on reading the Fx portion.

I am using the 1.4 headers and precompiled windows dll (downloaded in the last week). I have the source, but was testing with this first.

Thanks,
David

hmm, The code is there and it is DLLSPEC’d properly.

Do you have DOM_DYNAMIC defined for your project? You probably do because if you didn’t there would be a whole lot more errors. But if you don’t then do it because it is needed for using the DOM as a DLL.

-Andy

#define DOM_DYNAMIC gives errors if it is before #include “dom/domConstants”,
if after it has no effect on the error.
Where do I need to specify this? As a define or a linker flag?

Thanks for the assistance.
David

As a compiler flag. Depending on your compiler you will have to do this different ways. If you are using MSVC you can open the project properties and in C/C++ -> Preprocessor submenu you can add DOM_DYNAMIC to “Preprocessor Definitions”

If you are using gcc you need to make sure that you are passing in -DDOM_DYNAMIC as a compiler flag. There is probably a place to specify compiler flags in the Makefiles. You can add it there.

If you just #define DOM_DYNAMIC in your code it will most likely cause errors (as it did). It needs to be defined before you include any DOM headers in all of your source or header files. Specifying it as a compiler flag defines it for every source file.

-Andy

I still get the same error.

I’m trying to include this into an older vc++6 app.
Can this be done? Do I need to recompile the dll and lib for this to work?

One project I need to add Collada to is in VC++7-2003 abd onb is VC++6.

David

To tell you the truth I have no clue about the difference for VC++6 and the newer 7 and 8 DLLs. I say you probably need to recompile the DLL for VC++6.

We don’t support VC++6. I have only built and tested the DOM DLL with VC++7 and VC++8. At first there were some issues with linking the c and c++ standard libraries, since they changed between versions, using the DLL built with one version with a program built with the other. You may have something similar.

does the VC++7 project link for you?

-Andy

I have built the collada libs as a static lib for VC 6.
When I link I get only one set of errors - duplicate definition of std::basic_string.
I can’t find where this is occuring, it is being called by the database apparently.
Any idea how to stop this duplicate definition?
(If i remove the standard lib that contains it, i get tons of other not found errors.)

(By the way, the remove index error is gone.)

(The vc 7 version is being set up in a large project now, once they get the lib into the structure I can start testing it there also.)

David