C++ API Linker issues
Posted: Wed May 11, 2016 2:29 pm
I'm hoping someone here might have some insight to how to work with the C++ API.
The short version is that I have a very simple application that will compile in x86 and not run and that gives "unresolved external symbol" errors when compiled in x64.
I'm using Visual Studio (Community, if it matters) 2015. I started a new Win32 project and was able to get the Header file and .lib file setup properly, I'm reasonably certain. I understand I'll need to use different DLLs for the 2 different architectures, but it doesn't seem to matter if I grab them from the bin or the bin64 folder no matter what I've compiled or set VS where to look. For the moment, I'm copying the .dlls into the folder, since that gets checked first.
I'm also not entirely sure which set of APIs I'm supposed to be using, so I've just been trying everything. There is documentation that says I need tm1api.dll from the bin folder. But I've also seen it mentioned that I need tm1lib.dll as well, even though that file isn't referenced in the .lib file. Then I read somewhere else I should be using the Applix.TM1.API dlls from the API folder.
I mentioned that my x86 version will compile, which makes sense since linking into the DLLs is the last step in getting the program up and running, but when I try to run or debug it, I get an error saying:
x64 won't compile. Any references to TM1 spit back the unresolved error. I also get a warning that the tm1api.lib file is x86 instead of x64, which I'm guessing relates to the unresolved error, but there is only 1 version of the .lib in the api folder and since I did a x64 install of TM1 I would have expected to get the x64 lib instead of the x86.
So, I guess if I was trying to put all of this into easy to digest questions:
Which set of DLLs are supposed to be used?
Is there another architecture of the .lib out there floating around somewhere?
For an x64 install of TM1, which directory has the x64 architecture executables, the bin or the bin64? Normally I would think that a gimme question, but this is TM1 and I remember reading it was goofy for... some reason.
Thanks for any insight you can provide. If I get the whole mess up and running I'll try to post a guide incase anyone wants to join me in my descent into madness.
The short version is that I have a very simple application that will compile in x86 and not run and that gives "unresolved external symbol" errors when compiled in x64.
I'm using Visual Studio (Community, if it matters) 2015. I started a new Win32 project and was able to get the Header file and .lib file setup properly, I'm reasonably certain. I understand I'll need to use different DLLs for the 2 different architectures, but it doesn't seem to matter if I grab them from the bin or the bin64 folder no matter what I've compiled or set VS where to look. For the moment, I'm copying the .dlls into the folder, since that gets checked first.
I'm also not entirely sure which set of APIs I'm supposed to be using, so I've just been trying everything. There is documentation that says I need tm1api.dll from the bin folder. But I've also seen it mentioned that I need tm1lib.dll as well, even though that file isn't referenced in the .lib file. Then I read somewhere else I should be using the Applix.TM1.API dlls from the API folder.
I mentioned that my x86 version will compile, which makes sense since linking into the DLLs is the last step in getting the program up and running, but when I try to run or debug it, I get an error saying:
Code: Select all
The application was unable to start correctly (0xc000007b). Click OK to close the application.
So, I guess if I was trying to put all of this into easy to digest questions:
Which set of DLLs are supposed to be used?
Is there another architecture of the .lib out there floating around somewhere?
For an x64 install of TM1, which directory has the x64 architecture executables, the bin or the bin64? Normally I would think that a gimme question, but this is TM1 and I remember reading it was goofy for... some reason.
Thanks for any insight you can provide. If I get the whole mess up and running I'll try to post a guide incase anyone wants to join me in my descent into madness.