小编Sup*_*100的帖子

使用MSYS在Windows 7中构建nginx

我有Windows 7 Pro x86和Visual Studio 2010 Pro.另外我在c:\ MinGW中有MinGW.我想使用Visual C++在windows下构建nginx.我按照指南.

  1. 我在管理员下运行cmd,然后我调用"c:\ Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
  2. 在cmd中我运行C:\ MinGW\msys\1.0\msys.bat
  3. 在我下载先决条件之前,我cd到nginx source direcotry并运行configure脚本.
  4. 然后我运行nmake -f objs/Makefile

结果是以下错误:

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

'install' is up-to-date
    cl -O2  -W4 -WX -nologo -MT -Zi -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H 
       -Ycng x_config.h -Fpobjs/ngx_config.pch -c -I src/core-I src/event
       -I src/event/mod ules  -I src/os/win32  -I objs/lib/pcre-8.32  
       -I objs/lib/openssl/openssl/include -I objs/lib/zlib-1.2.7  -I objs
       -I src/http  -I src/http/modules -I src/mail -Foobjs/ngx_pch.obj 
       objs/ngx_pch.c …
Run Code Online (Sandbox Code Playgroud)

build nginx msys visual-c++

4
推荐指数
1
解决办法
2512
查看次数

Delphi记录转换为C#struct并写入socket

我有以下Delphi代码:

type
   RegbusReq2=packed record 
     Funct:char;             
     Device:char;           
     Device1:char;
     Starting:integer;       
     Quantity:smallint;      
     _CRC:Word;              //CRC
     stroka:char;          
   end;

   type                         
     crcReg=packed record
     buf:array[0..2] of byte;
     value:array[0..5] of byte;
   end;

   type                          
   myRB=record                      
   case byte of
    0:(data:RegbusReq2);
    1:(Buff:crcReg);
   end;
...
procedure TForm1.Button3Click(Sender: TObject);
var
  DataReq:myRB;
  Output:array[1..15] of Byte;
  i:integer;
  nomP:string;
  st:string;
begin
cs1.Address:=edit5.Text;  
 cs1.Port := 6001;
typecon:=2;

DataReq.data.Funct:=chr(63);    
DataReq.data.Device:=chr(48);     
DataReq.data.Device1:=chr(49);    
DataReq.data.Starting:=768;     
DataReq.data.Quantity:=7;      
DataReq.data._CRC:=CRC2(@DataReq.Buff.value,6);      
  memo1.Lines.Add(IntToStr(DataReq.data._CRC));
DataReq.data.stroka:=chr(13);             
application.ProcessMessages();
  cs1.Active:=true;
  cs1.Socket.SendBuf(DataReq.data,SizeOf(DataReq.data));
  application.ProcessMessages();
  cs1.Socket.ReceiveBuf(output,SizeOf(output));         
  application.ProcessMessages();
  cs1.Active:=false;
  application.ProcessMessages();

if output[1]<>62 then begin
  showmessage('îøèáêà ñâÿçè');
  exit;
end;
  for i:=10 to 15 do
  begin
    nomp:= …
Run Code Online (Sandbox Code Playgroud)

c# delphi pinvoke

1
推荐指数
1
解决办法
1672
查看次数

ThreadStart和ParameterizedThreadStart之间的调用是不明确的

我试着编译以下代码:

public class SplashScreenManager
{
    private static readonly object mutex = new object();
    public static ISplashScreen CreateSplashScreen(Stream imageStream, Size imageSize)
    {
        object obj;
        Monitor.Enter(obj = SplashScreenManager.mutex);
        ISplashScreen vm2;
        try
        {
            SplashScreenWindowViewModel vm = new SplashScreenWindowViewModel();
            AutoResetEvent ev = new AutoResetEvent(false);
            Thread thread = new Thread(delegate
            {
                vm.Dispatcher = Dispatcher.CurrentDispatcher;
                ev.Set();
                Dispatcher.CurrentDispatcher.BeginInvoke(delegate //<- Error 2 here
                {
                    SplashForm splashForm = new SplashForm(imageStream, imageSize)
                    {
                        DataContext = vm
                    };
                    splashForm.Show();
                }, new object[0]);
                Dispatcher.Run();
            });
            thread.SetApartmentState(ApartmentState.STA);
            thread.IsBackground = true;
            thread.Start();
            ev.WaitOne();
            vm2 …
Run Code Online (Sandbox Code Playgroud)

c# wpf multithreading

0
推荐指数
1
解决办法
1545
查看次数

标签 统计

c# ×2

build ×1

delphi ×1

msys ×1

multithreading ×1

nginx ×1

pinvoke ×1

visual-c++ ×1

wpf ×1