What's new

Problem with VC 6.0

euphoria

Emutalk Member
I get this error:
main.obj : error LNK2001: unresolved external symbol @asmGetCPUType@4
build/debug/odnet9.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

when i try to access function that is declared as:
extern BOOL asmGetCPUType(CPUID_T *);

and compiled with these settings in Custom Build:
Commands:
$(MSDEVDIR)\bin\nasmw.exe -f win32 $(InputPath) -o $(IntDir)\$(InputName).obj
Output:
$(intDir)\$(InputName).obj

The .obj file is located where all the other .obj's are and compiles ok

in the asm file i have delcared following:
global _asmGetCPUType
_asmGetCPUType:
; the code

What the hll im doing wrong? The assembler file compiles ok and but it seems that the linker doesn't see the .obj file for some reason?
With identical settings (-o coff) similar setup compiles with no errors in DJGPP.
 
OP
euphoria

euphoria

Emutalk Member
:blush: CRAP! i figured this out the minute i had posted this...
i am using __fastcall as default and had to declare the function as:
extern BOOL __cdecl asmGetCPUType(CPUID_T *);

i can be just so stupid sometimes (=all the time)
 

Top