Author Archives: Robins

[Solved] Android9.0 separately Compile framework Error: ninja failed with: exit status 1

mmm frameworks/base error

1.1 Error message

frameworks/base/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp:463:32: error: 'onNewImageSnapshot' marked 'override' but does not override any member functions
        virtual sk_sp<SkImage> onNewImageSnapshot() override {
                               ^
frameworks/base/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp:463:32: error: 'RenderNodeDrawable_projectionHwLayer_RenderThreadTest::doTheThing(renderthread::RenderThread &)::ProjectionLayer::onNewImageSnapshot' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
external/skia/src/image/SkSurface_Base.h:49:28: note: hidden overloaded virtual function 'SkSurface_Base::onNewImageSnapshot' declared here: different number of parameters (1 vs 0)
    virtual sk_sp<SkImage> onNewImageSnapshot(const SkIRect* subset = nullptr) = 0;
                           ^
frameworks/base/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp:530:40: error: allocating an object of abstract class type 'ProjectionLayer'
    sk_sp<SkSurface> surfaceLayer1(new ProjectionLayer(&drawCounter));
                                       ^
external/skia/src/image/SkSurface_Base.h:49:28: note: unimplemented pure virtual method 'onNewImageSnapshot' in 'ProjectionLayer'
    virtual sk_sp<SkImage> onNewImageSnapshot(const SkIRect* subset = nullptr) = 0;
                           ^
3 errors generated.
[ 41% 2049/4888] target dex2oat: out/target/product/xxxxxx_xxx/dex_bootjars/system/framework/arm/boot.art
ninja: build stopped: subcommand failed.
11:20:44 ninja failed with: exit status 1

#### failed to build some targets (08:18 (mm:ss)) ####

1.2 Solution

// use /* */  to comment out the frameworks/base/libs/hwui/Android.bp cc_test{***} will Ok, and you can compile now.
/*
 cc_test {
xxx
xxx
xxx
 }
*/

1.3 Test compilation

touch frameworks/base/core/res/res/values-zh-rCN/strings.xml
mmm frameworks/base

[100% 11/11] Install: out/target/product/xxxxxx/system/framework/framework-res.apk

build completed successfully (01:35 (mm:ss))

Compilation succeeded! ! !

[Solved] Spring Cloud Gateway Startup Error: Parameter 0 of method modifyRequestBodyGatewayFilterFactory in…

Error message:

Spring Cloud Gateway startup has been reporting an error with detailed error information

Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type ‘org.springframework.http.codec.ServerCodecConfigurer’ that could not be found.

Action:

Consider defining a bean of type ‘org.springframework.http.codec.ServerCodecConfigurer’ in your configuration.

View the source code:

1、GatewayClassPathWarningAutoConfiguration.java

The spring cloud Gateway gateway itself is a Spring Boot project. When the gateway microservice starts, it will automatically load its configuration. Among them, there is a configuration class called GatewayClassPathWarningAutoConfiguration , as follows:

You will see @ConditionalOnMissingClass({“org.springframework.web.reactive.DispatcherHandler”})

Add spring-boot-starter-webflux dependency if there is no DispatcherHandler.

Remove the spring-boot-starter-web dependency if there is a DispatcherHandler.

@Configuration(
    proxyBeanMethods = false
)
@AutoConfigureBefore({GatewayAutoConfiguration.class})
public class GatewayClassPathWarningAutoConfiguration {
    private static final Log log = LogFactory.getLog(GatewayClassPathWarningAutoConfiguration.class);
    private static final String BORDER = "\n\n**********************************************************\n\n";

    public GatewayClassPathWarningAutoConfiguration() {
    }

    @Configuration(
        proxyBeanMethods = false
    )
    @ConditionalOnMissingClass({"org.springframework.web.reactive.DispatcherHandler"}) //重点注解
    protected static class WebfluxMissingFromClasspathConfiguration {
        public WebfluxMissingFromClasspathConfiguration() {
            GatewayClassPathWarningAutoConfiguration.log.warn("\n\n**********************************************************\n\nSpring Webflux is missing from the classpath, which is required for Spring Cloud Gateway at this time. Please add spring-boot-starter-webflux dependency.\n\n**********************************************************\n\n");
        }
    }

    @Configuration(
        proxyBeanMethods = false
    )
    @ConditionalOnClass(
        name = {"org.springframework.web.servlet.DispatcherServlet"}
    )
    protected static class SpringMvcFoundOnClasspathConfiguration {
        public SpringMvcFoundOnClasspathConfiguration() {
            GatewayClassPathWarningAutoConfiguration.log.warn("\n\n**********************************************************\n\nSpring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web dependency.\n\n**********************************************************\n\n");
        }
    }
}

If the spring-boot-starter-web dependency is added to the pom file, the org.springframework.web.servlet.DispatcherServlet filter will exist in the project, which is incompatible with Spring Cloud Gateway conflicts.

2、GatewayAutoConfiguration.java

Open the GatewayAutoConfiguration class in the gateway automatic configuration class, and see that the bean org.springframework.http.codec.ServerCodecConfigurer is required in the following methods

@Bean
public ModifyRequestBodyGatewayFilterFactory modifyRequestBodyGatewayFilterFactory(ServerCodecConfigurer codecConfigurer) {
    return new ModifyRequestBodyGatewayFilterFactory(codecConfigurer.getReaders());
}

@Bean
public DedupeResponseHeaderGatewayFilterFactory dedupeResponseHeaderGatewayFilterFactory() {
    return new DedupeResponseHeaderGatewayFilterFactory();
}

@Bean
public ModifyResponseBodyGatewayFilterFactory modifyResponseBodyGatewayFilterFactory(ServerCodecConfigurer codecConfigurer, Set<MessageBodyDecoder> bodyDecoders, Set<MessageBodyEncoder> bodyEncoders) {
    return new ModifyResponseBodyGatewayFilterFactory(codecConfigurer.getReaders(), bodyDecoders, bodyEncoders);
}

Solution:

Spring cloud gateway is based on webflux, so remove the spring-boot-start-web dependency directly. If you need web services, add the spring-boot-starter-webflux dependency.

HuaWei ensp enterprise network simulator Error: raw-mod is unavailable courtesy of Hyper-V

Problem scenario: Huawei ensp enterprise network simulator reports an error “Starting device AR failed error code 40”

Alternative scenario: The following version of virtual box 6.1.4 reports an error raw-mod is unavailable courtesy of Hyper-V

Reason: Hyper-V is occupied by wsl2, and VB cannot be used, so close Hyper-V: before closing, you need to completely delete wsl2, which can be replaced by converting to wsl1.

  1. Convert wsl2 to wsl1 wsl --set-version Ubuntu 2
  2. Security Center – Device Security – Turn off Kernel Isolation.
  3. reboot

[Solved] increment Error: ERR value is not an integer or out of range

Error Messages:

org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR value is not an integer or out of range
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:54)
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:52)
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41)
	at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:268)
	at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.convertLettuceAccessException(LettuceStringCommands.java:799)
	at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.incr(LettuceStringCommands.java:332)
	at org.springframework.data.redis.connection.DefaultedRedisConnection.incr(DefaultedRedisConnection.java:323)
	at org.springframework.data.redis.connection.DefaultStringRedisConnection.incr(DefaultStringRedisConnection.java:557)
	at org.springframework.data.redis.core.DefaultValueOperations.lambda$increment$0(DefaultValueOperations.java:87)
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:224)
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184)
	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:95)
	at org.springframework.data.redis.core.DefaultValueOperations.increment(DefaultValueOperations.java:87)
	at cn.percent.common.utils.MyLockUtil.getNumberByRedis(MyLockUtil.java:141)
	at cn.percent.common.utils.NumberUtil.getNumberByRedis(NumberUtil.java:155)
	at cn.percent.common.utils.NumberUtil.getDateNumberByRedis(NumberUtil.java:76)
	at cn.percent.common.utils.NumberUtil.getDateNumber(NumberUtil.java:26)
	at cn.percent.Application.main(Application.java:32)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: io.lettuce.core.RedisCommandExecutionException: ERR value is not an integer or out of range
	at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:135)
	at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:108)
	at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)
	at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)
	at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:59)
	at io.lettuce.core.cluster.ClusterCommand.complete(ClusterCommand.java:63)
	at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:59)
	at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:646)
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:604)
	at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:556)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1421)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

Error Codes:

ValueOperations<String, String> forValue = stringRedisTemplate.opsForValue();
Long num = forValue.increment(NUM_ID.toString());

How to Solve:

When setting the expiration time, there is a problem with the milliseconds of the expiration time, you can remove it if you want to allow it.

ValueOperations<String, String> forValue = stringRedisTemplate.opsForValue();
forValue.set(NUM_ID.toString(), num.toString(), 1000000L);

[Solved] Forbidden (403) CSRF verification failed. Request aborted.

Forbidden (403)
CSRF verification failed. Request aborted.

You are seeing this message because this site requires a CSRF cookie when submitting forms. This cookie is required for security reasons, to ensure that your browser is not being hijacked by third parties.

If you have configured your browser to disable cookies, please re-enable them, at least for this site, or for “same-origin” requests.

Help
Reason given for failure:

    CSRF cookie not set.
    
In general, this can occur when there is a genuine Cross Site Request Forgery, or when Django’s CSRF mechanism has not been used correctly. For POST forms, you need to ensure:

Your browser is accepting cookies.
The view function passes a request to the template’s render method.
In the template, there is a {% csrf_token %} template tag inside each POST form that targets an internal URL.
If you are not using CsrfViewMiddleware, then you must use csrf_protect on any views that use the csrf_token template tag, as well as those that accept the POST data.
The form has a valid CSRF token. After logging in in another browser tab or hitting the back button after a login, you may need to reload the page with the form, because the token is rotated after a login.
You’re seeing the help section of this page because you have DEBUG = True in your Django settings file. Change that to False, and only the initial error message will be displayed.

You can customize this page using the CSRF_FAILURE_VIEW setting.

Solution:

add {% csrf_token %} in the corresponding <form>

[Solved] Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by serv

mysql reports Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Cause: An error is reported due to the mysql8.0 encryption method.

Solution:

execute instruction

mysql -u root -p

123456

use mysql;

alter user ‘root’@’localhost’ identified with mysql_native_password by ‘123456’;

flush privileges;

Note: 123456 is my own password to connect to the database

[Solved] Windows 7 IIS (HTTP Error 500.21 – Internal Server Error)

When I tested the website today, when I entered http://localhost/ in the browser, the following error occurred:

HTTP Error 500.21 – Internal Server Error

Handler “WebServiceHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list.

Reason: After installing Framework v4.0, and then enabling IIS, the Framework is not fully installed

Solution: Start->All Programs->Accessories->Right-click on “Command Prompt”->Run as Administrator->%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MDd_DynamicDebug’ does not match value ‘MTd_StaticDebug’

There are a bunch of errors in VS2012 C++ compilation today:

1  1 >   Generating code...
 2  1 >Code.obj : error LNK2005: " public: __thiscall std::_Container_base12::_Container_base12(void) " (?? 0_Container_base12@std@@QAE@XZ) already in msvcprtd. Defined in lib(MSVCP110D.dll)
 3  1 >Code.obj : error LNK2005: " public: __thiscall std::_Container_base12::~_Container_base12(void) " (?? 1_Container_base12@std@@QAE@XZ) already in msvcprtd. Defined in lib(MSVCP110D.dll)
 4  1 >Code.obj : error LNK2005: " public: void __thiscall std::_Container_base12::_Orphan_all(void) " (?_Orphan_all@_Container_base12@std@@QAEXXZ) is already defined in msvcprtd.lib(MSVCP110D.dll)
 5  1 > IOCP_Socket.lib(CLog.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' Mismatch for value 'MTd_StaticDebug' (in Code.obj)
 6  1 > IOCP_Socket.lib(TcpServer.obj) : error LNK2038: Detected mismatch for 'RuntimeLibrary': value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug'(Code. obj)
 7  1 > IOCP_Socket.lib(stdafx.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug' (in Code.obj)
 8  1 > IOCP_Socket.lib (TcpSrvException.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug' (in Code.obj)
 9  1> IOCP_Socket.lib(TcpReceiveContext.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug' (in Code.obj)
 10  1 > IOCP_Socket.lib(TcpSendContext.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug' (in Code.obj)
 11  1 > IOCP_Socket.lib(AcceptContext.obj) : error LNK2038: 'RuntimeLibrary' detected Mismatch for: value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug' (in Code.obj)
 12  1 > IOCP_Socket.lib(OperateContext.obj) : error LNK2038: Detected mismatch for 'RuntimeLibrary': value 'MDd_DynamicDebug' Mismatch value "MTd_StaticDebug" (in Code.obj)
 13  1 >IOCP_Socket.lib(MemoryBlock.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug' (in Code.obj)
 14  1 > IOCP_Socket.lib(ContextStack.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' does not match value 'MTd_StaticDebug' (in Code.obj)
 15  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " void __cdecl std:: _Debug_message(wchar_t const *,wchar_t const *,unsigned int) " (? _Debug_message@std@@YAXPB_W0I@Z) is already defined in libcpmtd.lib(stdthrow.obj)
 16  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " public: __thiscall std::_Container_base12::_Container_base12(void) " (??0_Container_base12@std@@QAE@XZ) is already defined in Code.obj
 17  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " public: __thiscall std::_Container_base12::~_Container_base12(void) " (?? 1_Container_base12@std@@QAE@XZ) is already defined in Code.obj
 18  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " public: void __thiscall std::_Container_base12::_Orphan_all(void) " (? _Orphan_all @_Container_base12@std@@QAEXXZ) is already defined in Code.obj
 19  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " void __cdecl std::_Xbad_alloc(void) " (?_Xbad_alloc@std@@YAXXZ) is already defined in libcpmtd.lib(xthrow.obj)
 20  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " void __cdecl std::_Xlength_error(char const *) " (? _Xlength_error @std@@YAXPBD@Z) has been defined in libcpmtd.lib(xthrow.obj)
 21  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " void __cdecl std::_Xout_of_range(char const *) " (? _Xout_of_range@std@@YAXPBD@Z) is already defined in libcpmtd.lib(xthrow.obj)
 22  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " char const * __cdecl std::_Syserror_map(int) " ( ?_Syserror_map@std@@YAPBDH@Z) is already defined in
 libcpmtd.lib(syserror.obj) 23  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " char const * __cdecl std::_Winerror_map(int) " ( ? _Winerror_map@std@@YAPBDH@Z) is already defined in
 libcpmtd.lib(syserror.obj) 24  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " public: __thiscall std::_Lockit::_Lockit(int ) " (?? 0_Lockit@std@@QAE@H@Z) already defined in libcpmtd.lib(xlock.obj)
 25  1 >msvcprtd.lib(MSVCP110D.dll) : error LNK2005: " public: __thiscall std:: _Lockit::~_Lockit(void) " (??1_Lockit@std@@QAE@XZ) is already defined in libcpmtd.lib(xlock.obj)
 26  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memmove is already defined in LIBCMTD.lib(memmove.obj)
 27  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fclose is already defined in LIBCMTD.lib(fclose.obj)
 28  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _fflush is already defined in LIBCMTD.lib(fflush .obj)
 29  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _printf is already defined in LIBCMTD.lib(printf.obj)
 30  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _vprintf is already defined Define 31  1 > in LIBCMTD.lib(vprintf.obj)
MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __vsnprintf_s is already defined in LIBCMTD.lib(vsnprnc.obj)
 32  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _vsprintf_s is already defined in LIBCMTD.lib(vsnprnc.obj ) in
 33  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __invalid_parameter is already defined in LIBCMTD.lib(invarg.obj)
 34  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _memcpy_s is already in LIBCMTD 35  defined in .lib(memcpy_s.obj)
 1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: _strncpy_s is already defined in LIBCMTD.lib(strncpy_s.obj)
 36  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void) " (?? 1exception@std@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
 37  1 >MSVCRTD.lib(MSVCR110D.dll ) : error LNK2005: " public: virtual char const * __thiscall std::exception::what(void)const " (? what@exception@std@@UBEPBDXZ) already defined in LIBCMTD.lib(stdexcpt.obj)
 38  1 > MSVCRTD.lib(MSVCR110D.dll) : error LNK2005: __CrtDbgReportW is already defined in LIBCMTD.lib(dbgrptw.obj)
 39  1 >MSVCRTD.lib(ti_inst.obj) : error LNK2005: " private: __thiscall type_info::type_info( class type_info const &) " (??0type_info@@AAE@ABV0@@Z) has been defined in LIBCMTD.lib(typinfo.obj)
 40  1 >MSVCRTD.lib(ti_inst.obj) : error LNK2005: " private: class type_info & __thiscall type_info::operator=( class type_info const &) " (?? 4type_info@@AAAAAV0@ABV0@@Z) is already defined in LIBCMTD.lib(typinfo.obj)
 41  1 >LINK : warning LNK4098: default library "MSVCRTD" conflicts with other libraries ; please use / NODEFAULTLIB:library
 42  1 >E:\Projects\C++ \IOCP_Socket\Debug\Test.exe : fatal error LNK1169: one or more multiply defined symbols were found
 43 ========== Generated : 0 successful, 1 failed , 0 latest , 0 skipped ==========

Later, I checked and found that it was a problem with the runtime library settings; the runtime library settings of several projects were different:

Project Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Libraries

All settings are the same. Multi-threaded debugging (/MTd)

error: src refspec master does not match any [How to Solve]

Since the last time I learned git, I have rarely used it.

 

The local repository is initialized with the following command:

$ git init

Then use the following command to add the remote library:

$ git remote add origin [email protected]:hahah/ftpmanage.git

then use

$ git push -u origin master

The following error occurs:

error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:hahaha/ftpmanage.git'

reason:

The local repository is empty

Solution: Use the following command to add the file;

$ git add add.php addok.php conn.php del.php edit.php editok.php ftpsql.sql index.php

$ git commit -m "init files"

After that, the following error occurred during the push process:

$ git push -u origin master
Warning: Permanently added the RSA host key for IP address 'xx.xx.xxx.xxx' to the list of known hosts.
To [email protected]:hahaha/ftpmanage.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to '[email protected]:hahahah/ftpmanage.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Prompt to use git pull after push

Use the following command to solve:

$ git pull --rebase origin master
warning: no common commits
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From github.com:hahah/ftpmanage
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
First, rewinding head to replay your work on top of it...
Applying: init files

Continue to push, succeed.

$ git push -u origin master
Counting objects: 10, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 5.15 KiB | 0 bytes/s, done.
Total 10 (delta 3), reused 0 (delta 0)
To [email protected]:hahaha/ftpmanage.git
   a2b5c30..1044f15  master -> master
Branch master set up to track remote branch master from origin.

You’re done!!!