关于process.h与—beginthreadex
来源:百度知道 编辑:UC知道 时间:2024/05/12 07:04:50
刚接触动态连接库,按照书上的例子做,但是怎么对照都发生错误。编译之后说:
--------------------Configuration: testdlib - Win32 Debug--------------------
Compiling...
testdlib.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\dlib\testdlib\testdlib.cpp(25) : error C2065: '_beginthreadex' : undeclared identifier
执行 cl.exe 时出错.
testdlib.exe - 1 error(s), 0 warning(s)
即-beginthreadex,没有声明,但是我在cpp中明明已经加了头文件#include <process.h>,我也查看了process.h,确实有-beginthreadex这个函数,然后我把#include <process.h>改成#include “process.h”,#include <process>,#include “process”,编译之后都不行。
下面我把代码发这里,希望高手帮帮我。。。我完全没辙了
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <process.h>
using namespace std;
#include"../dlib.h"
#pragma comment(lib,"..\\debug\\dlib.lib")
unsigned _stdcall s(LPVOID s)
{
--------------------Configuration: testdlib - Win32 Debug--------------------
Compiling...
testdlib.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\dlib\testdlib\testdlib.cpp(25) : error C2065: '_beginthreadex' : undeclared identifier
执行 cl.exe 时出错.
testdlib.exe - 1 error(s), 0 warning(s)
即-beginthreadex,没有声明,但是我在cpp中明明已经加了头文件#include <process.h>,我也查看了process.h,确实有-beginthreadex这个函数,然后我把#include <process.h>改成#include “process.h”,#include <process>,#include “process”,编译之后都不行。
下面我把代码发这里,希望高手帮帮我。。。我完全没辙了
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <process.h>
using namespace std;
#include"../dlib.h"
#pragma comment(lib,"..\\debug\\dlib.lib")
unsigned _stdcall s(LPVOID s)
{
同学 你用的是哪本书 能告诉我吗 ?
按照这个设置就不会有问题:
project setting -> c/c++ -> Code Generator -> use run-time library -> Mulitthreaded DLL
^^^^^^^^^^^^^^
因为默认的是单线程 单线程那你肯定创不了线程的 !
瑞气朝浮 浮五云阁
蓝兰岛漂流记
关于System Idle Process
关于SG WANNA BE《罪与恶》
关于进程System Idle Process........?
关于system idle process进程
关于System Idle Process进程
Generic H ost Process for Win32 Services什么意思
已知AD和BE是三角形ABC的高,H是AD与BE或是它们的延长线的交点,BH=AC,求角ABC的度数
关于S.H.E与花儿乐队的翻唱问题
关于H股开户问题与港股直通车?
△ABC中,∠ABC=45°,CD⊥AB于D,BE平分∠ABC,BE⊥AC于E,与CD相交于F,H是BC的中点,连结DH与BE相交于G.求