Hi VZ- One of your fancy error/debugging catchers told me it wanted dll files-so I gave them to it (except for the fbclient_ms.lib). Now it says- invalid format. It isn't too happy about that, and it is that which I am betting on that is causing the problem. Not sure why it can't accept 3 .lib files when linking. I used the /LD switch and I know it is trying to build the library with the mixed .lib and .dll files but hey, that would be cool. I am not sure what else to do. Thoughts? I did a complete re install of soci and firebird. I am going to post a screen dump of the end of the build of soci- It had 4 warnings. Code below.
VZ - it is cool to try to get this to work. I wish I could get it to work quicker for you. thanks! JM c:\upp\MyApps\socitest2>cl.exe /EHsc socitest2.cpp /I"c:\Program Files\firebird\firebird_3_0\include" /IC:\soci-4.0.2\include\soci /IC:\soci-4.0.2\build\include\soci /IC:\soci-4.0.2\build\include\soci\firebird /IC:\soci-4.0.2\build\include /IC:\soci-4.0.2\include\private\firebird /IC:\soci-4.0.2\include\private /IC:\soci-4.0.2\include\soci\firebird /IC:\soci-4.0.2\include /LD @liblist.txt soci_core_4_0.dll soci_firebird_4_0.dll Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl fbclient_ms.lib cl : Command line warning D9024 : unrecognized source file type 'soci_core_4_0.dll', object file assumed cl : Command line warning D9024 : unrecognized source file type 'soci_firebird_4_0.dll', object file assumed socitest2.cpp Microsoft (R) Incremental Linker Version 14.28.29914.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:socitest2.dll /dll /implib:socitest2.lib socitest2.obj fbclient_ms.lib soci_core_4_0.dll soci_firebird_4_0.dll soci_core_4_0.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x338 c:\upp\MyApps\socitest2> #include <iostream> #include "soci.h" #include "soci-firebird.h" #include "error-firebird.h" #include <iostream> #include <istream> #include <ostream> #include <string> #include <exception> #include "error.h" using namespace soci; using namespace std; soci::backend_factory const &backEnd = *factory_firebird(); int main(int argc, const char *argv[]) { int count; try { session sql(backEnd, "service=localhost:c:/Program Files/firebird/firebird_3_0/examples/empbuild/EMPLOYEE.FBD user-sysdba password=mypasswd"); sql << "select count(*) from employee", into(count); cout << count; } catch (soci::firebird_soci_error const & e) { cerr << "firebird error: " << " " << e.what() << endl; } catch (soci::soci_error const & e) { cerr << "Some other error: " << e.what() << endl; } return 0; } Build succeeded. "c:\soci-4.0.2\build\SOCI.sln" (default target) (1) -> "c:\soci-4.0.2\build\ALL_BUILD.vcxproj.metaproj" (default target) (2) -> "c:\soci-4.0.2\build\tests\firebird\soci_firebird_test.vcxproj.metaproj" (default target) (20) -> "c:\soci-4.0.2\build\tests\firebird\soci_firebird_test.vcxproj" (default target) (21) -> (ClCompile target) -> C:\soci-4.0.2\tests\firebird\test-firebird.cpp(1302,21): warning C4459: declaration of 'backEnd' hides global declara tion [c:\soci-4.0.2\build\tests\firebird\soci_firebird_test.vcxproj] C:\soci-4.0.2\tests\firebird\test-firebird.cpp(1303,40): warning C4459: declaration of 'connectString' hides global d eclaration [c:\soci-4.0.2\build\tests\firebird\soci_firebird_test.vcxproj] "c:\soci-4.0.2\build\SOCI.sln" (default target) (1) -> "c:\soci-4.0.2\build\ALL_BUILD.vcxproj.metaproj" (default target) (2) -> "c:\soci-4.0.2\build\tests\firebird\soci_firebird_test_static.vcxproj.metaproj" (default target) (22) -> "c:\soci-4.0.2\build\tests\firebird\soci_firebird_test_static.vcxproj" (default target) (23) -> C:\soci-4.0.2\tests\firebird\test-firebird.cpp(1302,21): warning C4459: declaration of 'backEnd' hides global declara tion [c:\soci-4.0.2\build\tests\firebird\soci_firebird_test_static.vcxproj] C:\soci-4.0.2\tests\firebird\test-firebird.cpp(1303,40): warning C4459: declaration of 'connectString' hides global d eclaration [c:\soci-4.0.2\build\tests\firebird\soci_firebird_test_static.vcxproj] 4 Warning(s) 0 Error(s) Time Elapsed 00:01:14.70 c:\soci-4.0.2\build>
_______________________________________________ soci-users mailing list soci-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/soci-users