Apologies if this is something simple, I'm very much a beginner.
I'm trying to include in a C++ program a package designed by somebody else, and keep getting the following error:
[Linker error] undefined reference to `_imp___Z11annAllocPtsii'
I think this is something to do with including the library that came with the package, which I've attempted to do with the following command in the linker command line:
-L "ANN.lib"
Is this not the correct way to include a library?
*edit* (The code aims to read data from a file into an array of a bespoke type 'ANNpointArray ')
I'm not sure how helpful it will be, but to be thorough here is my code:
I think this is something to do with including the library that came with the package, which I've attempted to do with the following command in the linker command line:
-L "ANN.lib"
Is this not the correct way to include a library?
It sounds like you're using MSVS. I don't know the commandline jargon for it, but in the projects settings there is a list of libs you link to. Off the top of my head it's something like Project | Settings, then go the "Linker | Input" section and it's one of the first boxes on the type. You would type "ANN.lib" into that box.
If that's what you did, and it's still not working, then there's probalby some other lib you need to link to. I would check with the documentation of whatever lib you're using. Maybe go to its website and find a tutorial that shows how to get it set up properly.