Hi,

I created a Static Library with a couple of funcionts in MASM32.

I use this def file:
LIBRARY XRT
EXPORTS
printline

The function has no parameters and I return a value in eax.


I'm trying to 'prototype' it in VC++ like this:

extern __stdcall unsigned int printline(void);
or
extern __stdcall void printline(void);

But I'm having problems at linking time:
error LNK2001: unresolved external symbol "unsigned int __stdcall printline(void)" (?printline@@YAIXZ)


:confused:

I got this : _printline@0 from DUMPBIN /exports.

How can I 'prototype' it??

Regards,
Mariano.
Posted on 2003-11-25 11:00:22 by Eternal Idol Birmingham
I think masm renames your function call for you.....

I think you need to call it by the same name that dumbbin returns.

ie _printline@0 .

Hope this helps
Posted on 2003-11-25 11:16:34 by -=Integrity=-
Nope, but thanks anyway man.

:)
:alright:
Posted on 2003-11-25 11:20:12 by Eternal Idol Birmingham
I have a published example that has the following prototype:-

extern "C" funcName(params);

good luck

obviously asumeing you have added relevant file to the project as well.
Posted on 2003-11-25 11:35:12 by -=Integrity=-
I guess we are getting closer to make it.


error LNK2001: unresolved external symbol _printline

Thanks man.


:alright:
Posted on 2003-11-25 11:43:41 by Eternal Idol Birmingham
For the record (if someone ever have this issue):

I took out the .DEF file because if you export the functions their suppouse to go a .DLL

Then I 'prototyped' like this:

extern "C" void __stdcall printline(void);

And it worked!!

:grin: :grin: :grin:
Posted on 2003-11-25 12:02:15 by Eternal Idol Birmingham
--- I removed the duplicate post in the heap - please don't crosspost..

Thomas
Posted on 2003-11-25 13:58:58 by Thomas