Tag Archives: library

Failed to resolve: com.github

Error after running someone else’s Demo:

Failed to resolve: com.github.yangjie10930:EpMedia:v0.8.2

Solutions:
1 in project build.gradle Join in

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

Full version

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

2 add in module

 compile ('com.github.yangjie10930:EpMedia:v0.8.2'){
        transitive = true
    }

Full version

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.joe.epmediademo"
        minSdkVersion 18
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile ('com.github.yangjie10930:EpMedia:v0.8.2'){
        transitive = true
    }
    testCompile 'junit:junit:4.12'
}

[solution] LD: warning: directory not found for option

In the process of IOS development, this problem is easy to be confused. Let’s have a break today.

Problems and Solutions

In short, there are two aspects to this problem.

The error is as follows, which means that it is an exception when querying Library .

"directory not found for option '-L/..."

resolvent:

Project – & gt; targets – & gt; build setting – & gt; library search paths

Delete the path inside

The error is as follows, which means that it is an exception when querying framework .

"directory not found for option '-F/..."

resolvent:

Project – & gt; targets – & gt; build setting – & gt; framework search paths

Delete the path inside

OK, it’s done.

The above problems have been solved. If you want to know more, you can continue to look down.

explain

Briefly speaking, library search paths and framework search paths .

Framework Search Paths

The explanation that can be found in official documents is as follows:

Locating Frameworks in Non-Standard Directories

If your project links to frameworks that are not included in any of the standard locations, you must explicitly specify the location of that framework before Xcode can locate its header files. To specify the location of such a framework, add the directory containing the framework to the “Framework Search Paths” option of your Xcode project. Xcode passes this list of directories to the compiler and linker, which both use the list to search for the framework resources.

Note: The standard locations for frameworks are the /System/Library/Frameworks directory and the /Library/Frameworks directory on the local system.

If the frameworks you refer to are not in standard locations, you need to set “framework search paths” in the configuration file of the project to specify search paths for compilers and linkers.

Library Search Paths

As for “library search paths”, there is no decent official document, but the content should be similar, but one is used to search framework , and the other is used to search Library .

Although it is said that, what is library and what is framework are still very vague.

However, we found some blogs to illustrate this problem, which are quoted below.

quote

Search paths settings in IOS development

In the development of IOS, we often encounter some path settings, such as the introduction of Baidu map SDK, copying projects to other computers, or reporting the error of library not found when multiple people develop at the same time, or introducing a third-party library, such as asihttprequest / retableview often reporting ? Include & lt; & gt; error, so we need to configure some search paths.

Framework/Library Search Paths

1、Framework Search Paths

The search path of the framework (. Framework bundles ) attached to the project is not widely used in IOS development. Generally, the framework built in the system is used for IOS development.

2、Library Search Paths

Xcode will automatically set the search path of the. A file to be dragged to the third-party library (. A files ) in the project. In order to facilitate transplantation or multi person collaborative development, it will usually be manually set.

For example, we will set the SDK of Baidu map as follows:

$(SRCROOT)/../libs/Release$(EFFECTIVE_ PLATFORM_ Name) , where $(srcroot) macro represents your project file directory, $(effective) _ PLATFORM_ Name) macro represents whether the current configuration is OS or simulator

Header Search Path

1. C / C + + header file reference

In C / C + +, include is a mutation instruction. When compiling, the compiler will replace the relative path with the absolute path. Therefore, the absolute path of the header file is equal to the search path + relative path.

(1) ? Include & lt; iostream. H & gt; : refers to the header file under the compiler’s class library path

(2) ? Include "hello. H" : the header file that refers to the relative path of the project directory

2、(User) Header Search Path

(1) header search path refers to the search path of the header file.

(2) User header search paths refers to the search path of user-defined header files

3、Always Search User Paths

If always search user paths is set to Yes , the compiler will first search the path configured by User header search paths . In this case, ? Include & lt; string. H & gt; , User header search paths the files under the search directory will cover the header files of the system.

reference material

    search paths settings in IOS development, IOS: clarify different search paths, IOS developer Library – including frameworks

The solution of undefined reference to error

Chen Yunwen

 

When compiling programs under Linux, we often encounter “undefined reference to XXX” error,

Here is a summary of some possible reasons and solutions for those in need:

 

Speaking of undefined reference error, let’s first mention the link rules of Linux GCC

 

The search order of links is as follows:

 

    – L to find the path specified by the environment variable library from left to right_ Path, use the ‘:’ partition to find / etc from left to right/ ld.so.conf The specified path order is / lib and / usr / lib (64 bit is / lib64 and / usr / lib64)

Search order of dynamic library calls:

 

The path specified by the – rpath parameter of

    LD is the path specified by the LD script that is written dead in the code_ LIBRARY_ Path / etc/ ld.so.conf The specified paths / lib and / usr / lib (64 bit is / lib64 and / usr / lib64)
are

In general, we use the – L method to specify the search path when linking, and use LD when calling dynamic link library_ LIBRARY_ Path to specify the link path

Another problem to note is that as long as the first one is found, it will be returned, and the later ones will not be found. For example, – L. / a – L. / B – LX has libx in a, libx. A and libx. A in B libx.so In this case, libx. A in. / a will be used instead of following the principle of dynamic library priority, because. / A is found first and there is no dynamic inventory with the same name in

 

 

For dynamic link library, the actual symbol positioning is carried out at run time. When compiling. So, if the library it needs is not associated with it, such as libx.so You need to use uldict, But forget to compile libx.so Add – luldit when compiling libx.so I won’t make a mistake when I’m here, because at this time libx.so It is considered as a library, in which there are some symbols that do not know the specific implementation, which are legal and can be specified at runtime or when compiling other binary programs

If G + + – lpath – LX is used The linker will find that the required uldict symbol table can not be found and report an error. However, if the program is loaded in dlopen mode, the program will run directly in this place and report an error because it is in runtime. Another case is that an external interface has been declared and defined in the dynamic library, but it has forgotten to implement it. At this time, the Similar mistakes can occur

If such an error is reported in the runtime, we should pay attention to whether it is due to the fact that some libraries are not linked or some interfaces are not implemented

 

 

With the above foundation, it is not difficult to see that the reasons for the undefined reference error are as follows:

    no corresponding library (. O /. A /. So) uses the entity defined in the library, but no library (- LXXX) or library path (- lyyy) is specified, which will lead to this error. The order of connecting library parameters is not right. By default, the more basic the library is, the more it should be written later, Whether it is static or dynamic, the version of GCC / LD does not match the compatibility of the version of GCC / LD. Due to the compatibility problems of the large versions of GCC 2 to GCC 3 (in fact, there are some problems in GCC 3.2 to 3.4), when using the low version of the machine on the high version machine, such errors will be caused. This problem is more common in the 32-bit environment, In addition, the 64 bit library is used carelessly in the 32-bit environment, or vice versa. The C / C + + interdependence and the mixed use of linking GCC and G + + compilation results need to ensure that both sides of extern “C” can use the interface. In our 64 bit environment, the GCC linking G + + library also needs to add – lstdc + +, For details, please refer to the description of hybrid compilation in the previous article. The problem of runtime error is basically due to the program using dlopen mode to load. So, but. So does not link all the required libraries. Please refer to the description of hybrid use of static library and dynamic library in the above section

     

VS2010 compiler can’t open include file: “GL / glaux. H”: no such file or directory


#include <
#include < gl/gl.h>
#include < gl/glu.h>
#include < gl/glaux.h>
#include < gl/glut.h>

=
=
=
=
=
=
C :\ Users \ LJ \ Desktop \ Tracking Locate \ Camera \ Stdafx.h (43): fatal error C1083: Failed to open included file: “gl/glaux. H” : No such file or directory
C:\Program Files\Microsoft SDKS \Windows\ V7.0 A\Include\gl There are only two Files under C:\Program Files\Microsoft SDKS \Windows\v7.0A\Include\gl
So in VS2010, the corresponding header file cannot be found in the default lookup process
C:\Program Files\Microsoft SDKS \Windows\ V7.0 A\Lib
You’d better download these files from the Internet.
So the problem should be solved by copying the glaux-h and glaux-lib files (sometimes using glaux-dll), respectively, to the path referenced by default in VS2010 above.

FileZilla server failed to initialize SSL Library

http://www.cnblogs.com/airoot/p/4516690.html reproduced first address

for Google and share into Chinese man

first said that the conclusion version is too high reduced to 0.9.44!! FZS history version download
click on the open link

, I have been using filezilla before. Today, I had a strange problem: after installing filezilla server in 2008R2, I intended to generate a certificate for SSL encryption. However, the error “Failed to initialize SSL library”

kept coming

the strange thing is, in some OS running on no problem, and then the related cases, baidu search to only one article: https://forum.filezilla-project.org/viewtopic.php?t=14852

> install Microsoft Visual C++ 2008 Redistributable Package, then install it.

and we continue to play around: compare the OS that runs SSL, and find out which components are not installed in R2 — which doesn’t work either;

suddenly thought to search Google, the fact that baidu is really not external. And Google came up with a bunch of them:

http://undefeated3.rssing.com/browser.php?indx=3477818& item=11163

https://forum.filezilla-project.org/viewtopic.php?t=14503

http://trac.filezilla-project.org/ticket/940

concluded that the above solution is mainly related to the following SSL DLLS:

msvcr71.dll, msvcr90. DLL (virtualization support)

libeay32.dll, ssleay32.dll (SSL support)

copy it to the filezilla installation directory or system32 directory, there is a Microsoft KB2533623 patch, the result is conceivable or not –!

and then I saw this

in one of the comments

then it occurred to me that the problem might be related to the filezilla version, down to 0.9.44(my maximum is 9.44, not 9.46). Problem solving… What a speechless to Fzs, out of such a buggy

attachment: FZS history version download

click the open link