newbie question about vc++ and dlls
-
(in visual studio .net) I'm a programmer mostly coming from the academic end of things (UNIX, gcc, etc.) and for the life of me cannot get variable types/functions from this dll. It's a development package for eeg analysis software that's supposed to allow me to read their specialized file format in c++ programs. Here's the link to the development kit: http://www.axon.com/pub/utility/axonfsp/windows/ and I'm interested in using the axabffio32.dll functions and what (esp. things like ABF_ReadOpen and Abffileheader). I've tried linking in the dir of the dll, copying the dll to the project dir, setting everything to release and adding the dll as a resource (as well as the #include of the dll)...what am I doing wrong??? here's the code: void main( int argc, char **argv ) { ABFFileHeader FH; ABF_Initialize(); ABFH_Initialize(&FH); Acquisition( argv[1], &FH ); ABF_Cleanup(); } and here's the error I most often get: c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(16) : error C2065: 'ABFFileHeader' : undeclared identifier c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(16) : error C2146: syntax error : missing ';' before identifier 'FH' c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(16) : error C2065: 'FH' : undeclared identifier c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(18) : error C3861: 'ABF_Initialize': identifier not found, even with argument-dependent lookup c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(19) : error C3861: 'ABFH_Initialize': identifier not found, even with argument-dependent lookup
-
(in visual studio .net) I'm a programmer mostly coming from the academic end of things (UNIX, gcc, etc.) and for the life of me cannot get variable types/functions from this dll. It's a development package for eeg analysis software that's supposed to allow me to read their specialized file format in c++ programs. Here's the link to the development kit: http://www.axon.com/pub/utility/axonfsp/windows/ and I'm interested in using the axabffio32.dll functions and what (esp. things like ABF_ReadOpen and Abffileheader). I've tried linking in the dir of the dll, copying the dll to the project dir, setting everything to release and adding the dll as a resource (as well as the #include of the dll)...what am I doing wrong??? here's the code: void main( int argc, char **argv ) { ABFFileHeader FH; ABF_Initialize(); ABFH_Initialize(&FH); Acquisition( argv[1], &FH ); ABF_Cleanup(); } and here's the error I most often get: c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(16) : error C2065: 'ABFFileHeader' : undeclared identifier c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(16) : error C2146: syntax error : missing ';' before identifier 'FH' c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(16) : error C2065: 'FH' : undeclared identifier c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(18) : error C3861: 'ABF_Initialize': identifier not found, even with argument-dependent lookup c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\abfDLL.cpp(19) : error C3861: 'ABFH_Initialize': identifier not found, even with argument-dependent lookup
-
You need to search for the identifier ABFFileHeader in the eeg include files and then #include it. Those errors do not relate to dlls in any way. Then once you have done that just link to the corresponding .lib for the header file.
ummmm.... well, this, perhaps? // HEADER: ABFHEADR.H. // PURPOSE: Defines the ABFFileHeader structure, and provides prototypes for // functions implemented in ABFHEADR.CPP for reading and writing // ABFFileHeader's. tried compiling with #include "ABFHEADR.H" and here's the error I get now... Compiling... abfDLL.cpp c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\ABFHEADR.H(961) : error C2501: 'STATIC_ASSERT' : missing storage-class or type specifiers
-
ummmm.... well, this, perhaps? // HEADER: ABFHEADR.H. // PURPOSE: Defines the ABFFileHeader structure, and provides prototypes for // functions implemented in ABFHEADR.CPP for reading and writing // ABFFileHeader's. tried compiling with #include "ABFHEADR.H" and here's the error I get now... Compiling... abfDLL.cpp c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\ABFHEADR.H(961) : error C2501: 'STATIC_ASSERT' : missing storage-class or type specifiers
-
ummmm.... well, this, perhaps? // HEADER: ABFHEADR.H. // PURPOSE: Defines the ABFFileHeader structure, and provides prototypes for // functions implemented in ABFHEADR.CPP for reading and writing // ABFFileHeader's. tried compiling with #include "ABFHEADR.H" and here's the error I get now... Compiling... abfDLL.cpp c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\ABFHEADR.H(961) : error C2501: 'STATIC_ASSERT' : missing storage-class or type specifiers
How are you trying to compile this? I just did it and it worked for me. I think that STATIC_ASSERT thing is erroneous I greped the src for it and could not find it anywhere. ANyway I put it axon* in c:\test then just open all the C:\test\AxonDev\Comp\Ax* and compile them. THe paths need to be adjusted like I had to prepend 'c:\test' to everything and change the post link setup for the .lib but thats it. Regards, Axe