PDA

View Full Version : Problems building simpleVRML project


Marcelo Fran
May 18th, 2005, 09:38 PM
I'm working with Visual C++ 6.0 and ARToolKit 2.70.1. I've followed all the steps of README.txt but the last one: to build simpleVRML.
How can I do this:

"(13) Enable the libARvrml and simpleVRML projects in the VS configuration manager and build."

There's no project file in SimpleVRML example, and I have no idea about what to do with libARvrml.vcproj , that is in directory ARToolKit\lib\SRC\ARvrml.

Does anybody knows how to solve this?

Thanks.

djoele
September 23rd, 2005, 04:32 PM
I?m having the same problem now. When I compile the simpleVRml example I get linker errors. Should be easy to solve I suppose:

Linking...
object.obj : error LNK2001: unresolved external symbol _arLoadPatt
object.obj : error LNK2001: unresolved external symbol _arVrmlLoadFile
simpleVRML.obj : error LNK2001: unresolved external symbol _arUtilTimerReset
simpleVRML.obj : error LNK2001: unresolved external symbol _arglSetupForCurrentContext
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoCapStart
simpleVRML.obj : error LNK2001: unresolved external symbol _arParamDisp
simpleVRML.obj : error LNK2001: unresolved external symbol _arInitCparam
simpleVRML.obj : error LNK2001: unresolved external symbol _arParamChangeSize
simpleVRML.obj : error LNK2001: unresolved external symbol _arParamLoad
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoInqSize
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoOpen
simpleVRML.obj : error LNK2001: unresolved external symbol _arMatchingPCAMode
simpleVRML.obj : error LNK2001: unresolved external symbol _arTemplateMatchingMode
simpleVRML.obj : error LNK2001: unresolved external symbol _arglTexmapMode
simpleVRML.obj : error LNK2001: unresolved external symbol _arglDrawMode
simpleVRML.obj : error LNK2001: unresolved external symbol _arImageProcMode
simpleVRML.obj : error LNK2001: unresolved external symbol _arFittingMode
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoDispOption
simpleVRML.obj : error LNK2001: unresolved external symbol _arUtilTimer
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoClose
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoCapStop
simpleVRML.obj : error LNK2001: unresolved external symbol _arglCleanup
simpleVRML.obj : error LNK2001: unresolved external symbol _arGetTransMatCont
simpleVRML.obj : error LNK2001: unresolved external symbol _arGetTransMat
simpleVRML.obj : error LNK2001: unresolved external symbol _arDetectMarker
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoGetImage
simpleVRML.obj : error LNK2001: unresolved external symbol _arVrmlTimerUpdate
simpleVRML.obj : error LNK2001: unresolved external symbol _arVrmlDraw
simpleVRML.obj : error LNK2001: unresolved external symbol _arglCameraView
simpleVRML.obj : error LNK2001: unresolved external symbol _arglCameraFrustum
simpleVRML.obj : error LNK2001: unresolved external symbol _arVideoCapNext
simpleVRML.obj : error LNK2001: unresolved external symbol _arglDispImage
Debug/simpleVRML.exe : fatal error LNK1120: 32 unresolved externals
Error executing link.exe.

simpleVRML.exe - 33 error(s), 0 warning(s)

Does it have to do with a missing lib or something?

philip_lamb
September 23rd, 2005, 11:30 PM
Have you built the libraries that the example depends on?
They are:
libAR
libARvideo
libARgsub_lite
libARvrml

The recommended way to build the simpleVRML example is to go the Visual Studio configuration manager (look under the "Build" menu in VS) and make sure that the boxes next to libARvrml and simpleVRML in the "build" column are ticked.

This is with VS.NET 2003.

djoele
September 26th, 2005, 02:57 PM
The first 3 libraries I have. The one I?m missing is the libARvrml library.

How can I build it? I have a folder lib\src\arvrml but that does not seem to be what I need.

philip_lamb
September 26th, 2005, 10:21 PM
Did you download the OpenVRML-0.14.3-win32 package?

http://prdownloads.sourceforge.net/artoolkit/OpenVRML-0.14.3-win32.zip?download

djoele
September 27th, 2005, 02:02 PM
In version 2.65 I found a folder libarvrml. The project contains vrml97.cpp and vrml97int.h
I think this is the project I have to build for getting the right library. It gives me arvrml.lib.

What I do is that I link this library against the simplevrml project. Should I also link the 3 libvrml97*.lib
files? I´m using VS6.0.

But I get this error:

object.obj : error LNK2001: unresolved external symbol "int __cdecl arVrml97LoadFile(char *)" (?arVrml97LoadFile@@YAHPAD@Z)
../../bin/twoViewd.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

simpleVRML.exe - 6 error(s), 0 warning(s)

djoele
September 27th, 2005, 07:53 PM
Which project or files wouls I need for creating the libARvrml library?

I?m using Visual Studio 6.0 and ARToolKit2.70.1.

philip_lamb
September 27th, 2005, 10:23 PM
Sorry, I just noticed that you're using VS6.
We didn't included project files for the VRML library and example for Visual Studio 6.
I'm sure there was a good reason for this.. perhaps some linking problem. I will have to ask Raphael Grasset who set up OpenVRML on the Windows platform for us.

You might have to stick with ARToolKit 2.65 and the old vrml97 library in the meantime.

djoele
September 28th, 2005, 01:02 PM
Thank you for your reply.

The thing we want to achieve is that we have 3 cameras running at the same time. Therefore we adapted the twoView example from ARToolkit 2.70.1. Then, overlaying OpenGl virtual objects is not a problem. So we would need to use that version of ARToolkit.

But we also want to overlay VRML objects. I thought therefore I needed to have the ARvrml library. I looked into the code and it contains for example the function "arVrml97LoadFile". So, I link this library against the adapted twoView example,
but then it gives me a "unresolved external symbol". This appears in the object.c file, at this line: object[i].vrml_id[j] = arVrml97LoadFile(object[i].name[j]);

Linking...
object.obj : error LNK2001: unresolved external symbol "int __cdecl arVrml97LoadFile(char *)" (?arVrml97LoadFile@@YAHPAD@Z)
../../bin/twoViewd.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Is there any other way to use the functions from arVrml97 without library linking, but just including them in the code? Or would that basicly be the same?

djoele
September 28th, 2005, 08:54 PM
If it there is a solution, I?d rather use VS6.0.

In case this could not be solved for VS6.0, I could always revert to VS7.1,right?

Would I then be able to use the twoView example and have the possibility to insert vrml objects?

philip_lamb
September 28th, 2005, 10:19 PM
Is there any other way to use the functions from arVrml97 without library linking, but just including them in the code? Or would that basicly be the same?

Yes, it would be. In any case, you still have to link to the OpenVRML library itself, and that is where the difficulty arises.

One thing that you could do.. build libARvrml from ARToolKit 2.65, link this against the old vrml97 library from ARToolKit 2.65, and then use these with the other libraries (libAR, libARgsub / libARgsub_lite, libARvideo) from ARToolKit 2.71.1.

There may be issues with this approach that I haven't thought of. In any case, you'll need some skills to set things up.

In case this could not be solved for VS6.0, I could always revert to VS7.1,right?

Would I then be able to use the twoView example and have the possibility to insert vrml objects?

This is what I would recommend. I know that a lot of users of VS6 are really attached to it, but honestly VS7.1 is no worse. (I use neither, thankfully.)

djoele
October 5th, 2005, 08:49 PM
Thanks for any help. I finally can show some vrml model.

The first time a marker is detected, it takes about a second to show anything.
After that everything goes smoothly. Is there something that can be done to take out this lag in time?

philip_lamb
October 11th, 2005, 12:52 AM
Thanks for any help. I finally can show some vrml model.

The first time a marker is detected, it takes about a second to show anything.
After that everything goes smoothly. Is there something that can be done to take out this lag in time?

Yes. This lag is when OpenVRML first draws the model. You can pre-draw the model (before the marker is actually seen) and then OpenVRML will have it cached.