I am glad that you got it to work. Yes, most of vbl_array_2d functions are inline.

Gehua


On Tue, Mar 5, 2013 at 11:17 AM, Huang, Dayu (GE Global Research) <huang@ge.com> wrote:

Gehua,

I was advised to do the following and it solved the problem. Thanks a lot.

I added the following to my cmake file:

TARGET_LINK_LIBRARIES( test vbl )

where test is my executive.

I also received two pieces of information that help me understand the issue:

1. vbl_array_2d is inline while vbl_array_3d is not.

2. The list of library that is linked against in VS is found in {/Linker/Input/Additional Dependencies}.

Best Regards,

Dayu

From: Huang, Dayu (GE Global Research)
Sent: Tuesday, March 05, 2013 9:54 AM
To: 'Gehua Yang'
Cc: vxl-users@lists.sourceforge.net
Subject: RE: [Vxl-users] error when linking against vbl_array_3d

Gehua,

Thanks for the quick response. My linker option (/Linker/General/Additional Library Directories in Visual Studio) is

C:/proj/vxl/bin/lib;C:/proj/vxl/bin/lib/$(Configuration);%(AdditionalLibraryDirectories)

The first / second folder is where I built the VXL. vbl.lib is present in both C:/proj/vxl/bin/Debug and C:/proj/vxl/bin/Release.

Dayu

From: Gehua Yang [mailto:yanggehua@gmail.com]
Sent: Monday, March 04, 2013 7:56 PM
To: Huang, Dayu (GE Global Research)
Cc: vxl-users@lists.sourceforge.net
Subject: Re: [Vxl-users] error when linking against vbl_array_3d

Hi,


As those are linking errors, I would like to know if you linked with vbl? What did your linking command look like?

Best,
Gehua

On Mon, Mar 4, 2013 at 6:02 PM, Huang, Dayu (GE Global Research) <huang@ge.com> wrote:

Hi,

I tried to use vbl_array_3d and vbl_array_2d. My code built successfully with vbl_array_2d. However, when I tried to build a simple test code using vbl_array_3d, I get the following error:

1> test.cxx

1>test.obj : error LNK2019: unresolved external symbol "public: void __thiscall vbl_array_3d<unsigned int>::fill(unsigned int const &)" (?fill@?$vbl_array_3d@I@@QAEXABI@Z) referenced in function _main

1>test.obj : error LNK2019: unresolved external symbol "public: void __thiscall vbl_array_3d<unsigned int>::resize(unsigned int,unsigned int,unsigned int)" (?resize@?$vbl_array_3d@I@@QAEXIII@Z) referenced in function _main

1>test.obj : error LNK2019: unresolved external symbol "protected: void __thiscall vbl_array_3d<unsigned int>::destruct(void)" (?destruct@?$vbl_array_3d@I@@IAEXXZ) referenced in function "public: __thiscall vbl_array_3d<unsigned int>::~vbl_array_3d<unsigned int>(void)" (??1?$vbl_array_3d@I@@QAE@XZ)

1>C:\proj\test.exe : fatal error LNK1120: 3 unresolved externals

As you will see below, the codes for using vbl_array_3d and 2d are almost identical. I will appreciate any comments on possible sources of error and solutions.

My code using vbl_array_2d is

#include <vbl/vbl_array_2d.h>

int main( int argc, char *argv[] )

{

vbl_array_2d<unsigned int> testarray;

testarray.resize(10,10);

testarray.fill(0);

return 0;

}

My code using vbl_array_3d is

#include <vbl/vbl_array_3d.h>

int main( int argc, char *argv[] )

{

vbl_array_3d<unsigned int> testarray;

testarray.resize(10,10,3);

testarray.fill(0);

return 0;

}

Dayu Huang


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Vxl-users mailing list
Vxl-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vxl-users