findthread problems
Hello
- I want to use findthread with visual studio 2013 and x64 target. I tried fist without using findthread to see if pthreadVC2.lib is added as a linker but It seems it is not. I also tried to give full path but same result. Config and generate is succeed. Cmakelists has
cmake_minimum_required(VERSION 3.1)
project(deneme)
add_executable(myexe.exe mysource.cpp)
set_target_properties(myexe.exe PROPERTIES LINK_DEPENDS "pthreadVC2.lib")
message( STATUS "basarili"})
- mysource.cpp could not built ** even if I add pthreadVC2.lib as linker manually ** because " could not open file "pthreadVC2.lib" .
#include <iostream>
#include <pthread.h>
void* start_routine(void* args)
{
return args;
}
using namespace std;
int main()
{
/* This is a compile and link test, no code to actually run things. */
pthread_t thread;
pthread_create(&thread, 0, start_routine, 0);
pthread_join(thread, 0);
return 0;
}
So , I had a huge project actually but It get errors in findthread and I could not understand why thread cause lots of error (tried with codeblocks and again errors). So thats why I created a basic cmakelists to see. Help is needed Thnks