simple question
-
I have this dll with a routine in it that I what to call. Lets call it comp1. So ... I create a project and add a C++ file to it that looks like this I change my prject setting so that comp1.lib is in that setting window. #include #include "comp1.h" void main( int argc, char * argv[] ) { char array[19]; comp1( "blah", "blah1", "blah3", array ); } I compile ok but when I link I get this error LNK2001: unresolved exteranl symbol "int __cdecl comp1( char *, char*, char*, char *const)" (?comp1@@YAHOOSOMETHING@Z) What am i doing wrong?
-
I have this dll with a routine in it that I what to call. Lets call it comp1. So ... I create a project and add a C++ file to it that looks like this I change my prject setting so that comp1.lib is in that setting window. #include #include "comp1.h" void main( int argc, char * argv[] ) { char array[19]; comp1( "blah", "blah1", "blah3", array ); } I compile ok but when I link I get this error LNK2001: unresolved exteranl symbol "int __cdecl comp1( char *, char*, char*, char *const)" (?comp1@@YAHOOSOMETHING@Z) What am i doing wrong?
Try using: #pragma comment(lib, "comp1.lib") See if that works. -Jack To an optimist the glass is half full. To a pessimist the glass is half empty. To a programmer the glass is twice as big as it needs to be.
-
Try using: #pragma comment(lib, "comp1.lib") See if that works. -Jack To an optimist the glass is half full. To a pessimist the glass is half empty. To a programmer the glass is twice as big as it needs to be.
-
Try using: #pragma comment(lib, "comp1.lib") See if that works. -Jack To an optimist the glass is half full. To a pessimist the glass is half empty. To a programmer the glass is twice as big as it needs to be.
oops correction ... compl.lib was not in te right directory. I have copied it to the right place now and pragma lib doesn't say anything now. and I am now doing a the extern "C" { ... } ... bit and now I get LNK1106: invalid file or disk full: cannot seek 0xa3298473298 AAARRRRRRGGGGGHHHHH!!!!! help!