求助:cannot find entry symbol 调用了别人的静态库编译不通过

heibaozi
Posts: 7
Joined: Thu Apr 11, 2019 9:47 am

求助:cannot find entry symbol 调用了别人的静态库编译不通过

Postby heibaozi » Sun Apr 28, 2019 8:01 am

component下的component.mk

COMPONENT_ADD_INCLUDEDIRS := ./include ./lib
COMPONENT_ADD_LDFLAGS := -e$(COMPONENT_PATH)/lib/libhilinkdevicesdk.a

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: 求助:cannot find entry symbol 调用了别人的静态库编译不通过

Postby ESP_Gargamel » Sun Apr 28, 2019 8:25 am

1、请提供一下你的目录结构;
2、你的库是针对 esp32 的?

LIBS += hilinkdevicesdk

COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/hilink/lib $(addprefix -l,$(LIBS))

可以用这样的目录结构:
.
├── README.md
├── component.mk
└── hilink
    ├── include
   │   ├── hilink_link.h
   │   ├── hilink_osadapter.h
   │   ├── hilink_profile.h
   │   └── hilink_socket.h
   └── lib
      └── libhilinkdevicesdk.a

heibaozi
Posts: 7
Joined: Thu Apr 11, 2019 9:47 am

Re: 求助:cannot find entry symbol 调用了别人的静态库编译不通过

Postby heibaozi » Sun Apr 28, 2019 10:09 am

ESP_JG wrote:
Sun Apr 28, 2019 8:25 am
1、请提供一下你的目录结构;
2、你的库是针对 esp32 的?

LIBS += hilinkdevicesdk

COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/hilink/lib $(addprefix -l,$(LIBS))

可以用这样的目录结构:
.
├── README.md
├── component.mk
└── hilink
    ├── include
   │   ├── hilink_link.h
   │   ├── hilink_osadapter.h
   │   ├── hilink_profile.h
   │   └── hilink_socket.h
   └── lib
      └── libhilinkdevicesdk.a
针对的是esp8266的
project
├──main
│   └──app_main.c
├──componet
├── component.mk
├──hilink
├──include
│ ├──hilink.h
├──lib
├──libhilinkdevice.a

Who is online

Users browsing this forum: No registered users and 158 guests