NO

Author Topic: [RESOLVED] "Unresolved external symbol" on Vista 64  (Read 5624 times)

nicolas.sitbon

  • Guest
[RESOLVED] "Unresolved external symbol" on Vista 64
« on: June 21, 2009, 01:25:45 AM »
I have installed Pelle's C 64 stable version  on vista sp2 64, I compile a simple program without any problem in 32 bits but the same program give me some linkage error when compiled in 64 bits:
Quote
Building main.obj.
C:\Users\nsitbon\Documents\Pelles C Projects\test\main.c(4): warning #2203: Function 'main' can't be __fastcall, changed to __cdecl.
Building test.exe.
POLINK: error: Unresolved external symbol '__imp_HeapCreate'.
POLINK: error: Unresolved external symbol '__imp_HeapDestroy'.
POLINK: error: Unresolved external symbol '__imp_HeapAlloc'.
POLINK: error: Unresolved external symbol '__imp_HeapReAlloc'.
POLINK: error: Unresolved external symbol '__imp_HeapFree'.
POLINK: error: Unresolved external symbol '__imp_HeapSize'.
POLINK: error: Unresolved external symbol '__imp_HeapValidate'.
POLINK: error: Unresolved external symbol '__imp_ExitProcess'.
POLINK: error: Unresolved external symbol '__imp_GetSystemTimeAsFileTime'.
POLINK: error: Unresolved external symbol '__imp_GetStartupInfoA'.
POLINK: error: Unresolved external symbol '__imp_GetFileType'.
POLINK: error: Unresolved external symbol '__imp_GetStdHandle'.
POLINK: error: Unresolved external symbol '__imp_GetCurrentProcess'.
POLINK: error: Unresolved external symbol '__imp_DuplicateHandle'.
POLINK: error: Unresolved external symbol '__imp_SetHandleCount'.
POLINK: error: Unresolved external symbol '__imp_GetCommandLineA'.
POLINK: error: Unresolved external symbol '__imp_GetModuleFileNameA'.
POLINK: error: Unresolved external symbol '__imp_GetEnvironmentStrings'.
POLINK: error: Unresolved external symbol '__imp_FreeEnvironmentStringsA'.
POLINK: error: Unresolved external symbol '__imp_UnhandledExceptionFilter'.
POLINK: error: Unresolved external symbol '__imp_RtlUnwindEx'.
POLINK: error: Unresolved external symbol '__imp_SetConsoleCtrlHandler'.
POLINK: error: Unresolved external symbol '__imp_VirtualAlloc'.
POLINK: error: Unresolved external symbol '__imp_VirtualQuery'.
POLINK: fatal error: 24 unresolved external(s).
*** Error code: 1 ***
Done.

Here is my code:
Code: [Select]
int main(void)
{
   return 0;
}
« Last Edit: June 21, 2009, 11:07:42 AM by nicolas.sitbon »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: "Unresolved external symbol" on Vista 64
« Reply #1 on: June 21, 2009, 10:41:38 AM »
Did you create a new project or did you copy the project ???

You need to change the library and header search folders for a 64-bit project to the 64-bit ones, if you change an existing project from 32 to 64-bit.
---
Stefan

Proud member of the UltraDefrag Development Team

nicolas.sitbon

  • Guest
Re: "Unresolved external symbol" on Vista 64
« Reply #2 on: June 21, 2009, 11:06:34 AM »
OK, thanks, you're right, I changed an existing 32 bits project to a 64 bits. If I create a new 64 bits project, it works correctly.
My apologize.

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: [RESOLVED] "Unresolved external symbol" on Vista 64
« Reply #3 on: June 21, 2009, 07:03:32 PM »
The latest version v6 allows one to change a 32-bit project into a 64-bit project, you should try that.
---
Stefan

Proud member of the UltraDefrag Development Team

nicolas.sitbon

  • Guest
Re: [RESOLVED] "Unresolved external symbol" on Vista 64
« Reply #4 on: June 21, 2009, 08:09:10 PM »
Thank you for pointing me that, but I prefer stay on a stable version. I like using software bug free, spending more times using functionnalities instead of tracking bug.

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: [RESOLVED] "Unresolved external symbol" on Vista 64
« Reply #5 on: June 21, 2009, 09:12:03 PM »
Thank you for pointing me that, but I prefer stay on a stable version. I like using software bug free, spending more times using functionnalities instead of tracking bug.
The stable version has also some bugs, so you can choose the unstable version, where errors will be corrected or the stable version, which stay as it is.  ;)
best regards
 Alex ;)