views:

68

answers:

2

Hi, I'm using MS Visual Studio 2008 professional edition on windows 7 64bit. I installed the 64 bit compilers along with the standard 32bit ones.

I have used http://argtable.sourceforge.net/ for windows 32bit programs before

I have no problems building my application (Which is just written in plain and simple C89) to use argtable2.lib for a win32 target, though when I set the "Active solution platform" to "x64", I get a bunch of errors during the linking stage regarding unresolved external symbols.

error LNK2019: unresolved external symbol arg_lit0 referenced in function main error LNK2019: unresolved external symbol arg_strn referenced in function main error LNK2019: unresolved external symbol arg_end referenced in function main ...

ending with " fatal error LNK1120: 9 unresolved externals".

I spotted some options such as the linker option "/MACHINE:X64", but I dont know how to use this or whether I should even be touching that option.

I think I need to do something involving building a 64bit capable version of argtable2.lib, but I dont know how to do this. Any ideas?

+2  A: 

.lib giles are not agnostic- 32 and 64 bit lib files are separate. so you need to build a 64 bit version (not 64 bit capable) of argtable2.lib.

TomTom
How would I do that?
Nemykal
Recompiling. The rest depends on how the project is compiled in the first place and how compatible it is. In general, I would contact the maintainers of the project.
TomTom
A: 

I found the solution myself, going to let everyone else know if anyone gets the same issue. Instead of using nmake to create the static lib, I made a new vc++ 2008 project, added all the necessary argtable .c's and .h's, set the type of project to Static Lib, and compiled. Worked fine set to 64bit with linker set to /MACHINE:X64. Now my application is fully 64bit.

Nemykal