0

I have a program that I have no problems with, and it compiles on my a computer that I have which runs windows 7 32bit. To run the program, I have to use a library, which I have the .h and the .lib files for.

I needed to make a small change to the program, just changing some of the text output on the help screen, but I was doing it from another computer, which is running windows 7 64bit. When I attempt to compile the program, without making any changes to the code, just copying the files over to the new computer from dropbox, I get "LNK2019: unresolved external symbol ..." for some of the functions that I am calling from the library.

For compiling, I am using Qt Creator, and calling on the microsoft visual studio compiler (I use the same on both computers, except of course that one is x64 and the other x86).

Has anyone encountered an issue similar to this in the past? If so, what did you do to fix it?

user3830784
  • 355
  • 3
  • 17
  • There's very probably an appropriate answer for your problem here: http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix – πάντα ῥεῖ Dec 04 '14 at 22:21

1 Answers1

0

Almost certainly your problem is your make files/build system.

Either you are targeting 32-bit standard libraries that don't exist on the 64 bit platform.

or you have copied 32-bit libraries from the other system and are linking to 64 bit libraries on the new system

Rafael Baptista
  • 11,181
  • 5
  • 39
  • 59
  • Is there a way to force it to use the 32 bit libraries when making it, even though it is being compiled on a 64bit system? – user3830784 Dec 04 '14 at 22:28
  • YOur question would be a lot clearer if you listed the actual link error. E.g. it would tell us a lot of the errors were from the c standard library of the wrong number of bits. – Rafael Baptista Dec 04 '14 at 22:33
  • You generally can use 32 bit libraries on a 64 bit system - but you have to ask for them specifically and in some cases you may also have to download special libraries. You're generally better off using the system libraries that come standard and modifying your program. – Rafael Baptista Dec 04 '14 at 22:34