English 中文(简体)
WsO2 CPP 交叉编译错误
原标题:Error cross-compiling wsO2 CPP

I m 使用 WSO2 CPP 开发一个在 ARM 处理器上运行的应用程序。 当我在编译时发现错误时, 我正试图在基于 Linux 的 PC 计算机中交叉调试库。 我将 WSO2 配置为 :


    export CXXFLAGS="-O2 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp"
    export CXXFLAGS=${CXXFLAGS}" -I/home/logic/Logic_BSPs/Linux_3.0/1021559_LogicPD_Linux_BSP_2.0-5p1/rootfs/usr/include"
    export LDFLAGS=" -L/home/logic/Logic_BSPs/Linux_3.0/1021559_LogicPD_Linux_BSP_2.0-5p1/rootfs/usr/lib"

    INSTALL_DIR=/home/logic/Logic_BSPs/Linux_3.0/1021559_LogicPD_Linux_BSP_2.0-5p1/rootfs/usr

    CC=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc 
    CXX=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-g++ 
    AR=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ar 
    RANLIB=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ranlib 
    ./configure --prefix=${INSTALL_DIR} 
        --build=i686-linux --host=arm-none-linux-gnueabi 
        --target=arm-none-linux-gnueabi --with-apache2=no

在汇编时,报告的错误是:

    /opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../../../.. -I../../../../../include -I../../../../../src/core/transport -I../../../../../src/core/transport/http -I../../../../../src/core/transport/http/sender/libcurl -I../../../../../src/core/description -I../../../../../src/core/context -I../../../../../src/core/phaseresolver -I../../../../../src/core/engine -I../../../../../src/core/deployment -I../../../../../util/include -I../../../../../axiom/include -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Wno-implicit-function-declaration -g -D_GNU_SOURCE -DAXIS2_SVR_MULTI_THREADED -DAXIS2_SSL_ENABLED -MT ssl_stream.lo -MD -MP -MF .deps/ssl_stream.Tpo -c ssl/ssl_stream.c  -fPIC -DPIC -o .libs/ssl_stream.o
    In file included from http_client.c:32:
    ssl/ssl_stream.h:26:25: error: openssl/ssl.h: No such file or directory
    make[11]: *** [http_client.lo] Error 1
    make[11]: *** Waiting for unfinished jobs....
    In file included from ssl/ssl_stream.c:21:
    ssl/ssl_stream.h:26:25: error: openssl/ssl.h: No such file or directory
    In file included from ssl/ssl_stream.c:22:
    ssl/ssl_utils.h:33: error: expected  = ,  , ,  ; ,  asm  or  __attribute__  before  *  token
    ssl/ssl_utils.h:40: error: expected  = ,  , ,  ; ,  asm  or  __attribute__  before  *  token
    ssl/ssl_utils.h:49: error: expected declaration specifiers or  ...  before  SSL_CTX 
    ssl/ssl_utils.h:50: error: expected declaration specifiers or  ...  before  SSL 
[...]

看起来有错误的库没有配置 CXXFLAGS 变量:您可以看到,在编译命令中不包括 / home/log/logic/logic。

你能解决这个问题吗?

Thanks and Best Regards, Joaquim Duran

问题回答

问题是它无法找到打开的包含文件 。

    ssl/ssl_stream.h:26:25: error: openssl/ssl.h: No such file or directory

首先检查为正在编译的环境安装开关的位置, 然后您需要通过指定 - I 编译标记的包含路径来告诉编译器这些内容的位置 。

当您配置包含路径时, 请尝试使用绝对路径, 而不是有数条. / 路径的长相对路径。 如此调试更容易包含路径问题 。

我也有同样的问题。对我来说,这是两件事情。我需要指定CFLAGS,而不仅仅是CXXFLAGS。此外,我在路上用一个~指向家,而建筑过程出于某种原因并不喜欢。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签