g++ -L"E:\libuv-1.7.5-win64-msvc140\static\lib" -L"E:\cassandra-cpp-driver-2.2.2-win64-msvc140\lib" -o "simple.exe" ./src/simple.o -llibuv -lcassandra
./src/simple.o: In function `main':
E:\workspace\simple\Debug/../src/simple.cpp:17: undefined reference to `cass_cluster_new'
collect2.exe: error: ld returned 1 exit status
make: *** [simple.exe] Error 1
I cannot figure out why this is happening. I have attached the screen shots for reference for eclipse. Any help will be appreciated.
Fero
Attached is a VS 2015 solution/project (x64) using the DataStax C/C++ driver v2.2.2, libuv v1.7.5, and OpenSSL v1.0.2d binaries downloaded from downloads.datastax.com. This project creates an executable for the simple example that can be found here (https://github.com/datastax/cpp-driver/blob/master/examples/simple/simple.c). This solution/project was created from the 'Empty Project' template wizard in Visual Studio 2015 so that you can easily visually see all the changes made to the Include and Library Directories (VC++ Directories) as well as the additional dependencies (Linker->Input section).
NOTE: The example I provided in this attachment uses the static libraries and can be easily updated to accommodate the use of the shared libraries instead.
~Fero
even i am facing same issue but windows 7 and VS 2010. Can i know why this problem..? is any workaround for windows 7 and VS 2010..
let me know
Regards
Vivek
Not sure why you are experiencing issues, but it I have a feeling that it might be due to not including all the necessary libraries that require linking; besides the basic Cassandra (or cassandra_static), libuv, and OpenSSL libraries. You will also need to add the following libraries for linking; iphlpapi, psapi, wsock32, crypt32, ws2_32, and userenv (if using libuv v1.6.0+).
I have attached a Visual Studio 2010 solution/project (x64) using the DataStax C/C++ driver v2.4.2, libuv v1.8.0, and OpenSSL v1.0.2h binaries downloaded from downloads.datastax.com. This project creates an executable for the simple example that can be found here (https://github.com/datastax/cpp-driver/blob/2.4.2/examples/simple/simple.c). This solution/project was created from the 'Empty Project' template wizard in Visual Studio 2010 along with the addition of an x64 configuration and the removal of the Win32 configuration. When you inspect the project setting you should be able to see all the changes made to the Include and Library Directories (VC++ Directories) as well as the additional dependencies (Linker->Input section).
NOTE: The example I provided in this attachment uses the static libraries and can be easily updated to accommodate the use of the shared libraries instead. Also you will want to rename the file extension from piz to zip before extracting the archive.
~Fero
Thank you. now working fine