Hello,
I've a problem:
I wanted to make a library and use it in a program but I just got this error-messages:
POLINK: error: Unresolved external symbol '_test'.
POLINK: fatal error: 1 unresolved external(s).
This are the files:
The Header:
#ifndef TEST_H
#define TEST_H
#include <stdio.h>
int test(void);
#endif
The lib:
#include <test.h>
int test(void)
{
printf("Test\n");
return 0;
}
and at last the file which should use the lib:
#include <test.h>
#pragma comment (lib, "test.lib");
int main ()
{
test();
return 0;
}
The header and the lib are in the right folders.
The pathes to the folders (in (the) project options) are also set right.
Maybe you can help me,
Thank You
Is there no-one who can help me?
I've just made the lib and tested it with your test code, no problems. So I can't say what you are doing wrong.
There are two things you should put right however.
#include "test.h"
int main(void)
John
use same calling conventions in program and library or use keywords _cdecl or _stdcall
Hello,
thank you, I tried so but it also not works.
I'll try it again ma I made a mistake but if not I don't know whats wrong
This was my working test project.
Thank you very much!