Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20641 Discussions

Autoreconf : linking to static library with Libtool

Altera_Forum
Honored Contributor II
1,193 Views

I have a library (curl) that is compiled in static which gives libcurl.a and I have another library (microxml) which is compiled in static which also gives libmicroxml.a .I have tried to make a link between these 2 library and autoreconf. First ,I try to add these lines in this way in Makefile.am

 

 

Easycwmpddir = / home / amine / ecos Easycwmpd_LTLIBRARIES = libcurl.a 

libmicroxml.a 

 

 

And add this line in configure.ac

 

 

LT_INIT (LIBTOOL) 

 

 

when I made the following command: autoreconf -i It gives the following error: 

 

 

Bin / Makefile.am: 34: error: 'libcurl.a' is not a standard libtool 

library name Bin / Makefile.am: 34: did you mean 'libcurl.la'? Bin / 

Makefile.am: 34: error: 'libmicroxml.a' is not a standard libtool 

library name Bin / Makefile.am: 34: did you mean 'libmicroxml.la'? 

 

 

Even if i changed libcurl.a by libcurl.la The autoreconf -i command works and so on for this command 

 

 

./configure --disable-shared 

 

 

But when I typed the command: Make 

He gave me the following error: 

 

 

Make [1]: *** No rule to make the target "libcurl.c", needed for 

"libcurl.lo". Stop. 

 

So I tried to make another solution in which I addthese lines in Makefile.am

 

Easycwmpd_LDADD = / home / amine / ecos / libcurl.a 

/home/amine/ecos/libmicroxml.a 

 

 

then i add this line in configure.ac

 

 

LT_INIT (LIBTOOL) 

 

 

when I made the following command: autoreconf -i works and so on for this command 

 

 

> ./configure --disable-shared 

 

 

But when I typed the command: Make 

He gave me the following error: 

 

 

> ../src/easycwmpd-backup.o: In function `backup_add_event ': Backup.c 

> .text + 0x11d3): undefined reference to `asprintf ' Backup.c  

> .text + 0x1280): undefined reference to `asprintf ' 

> ../src/easycwmpd-config.o: In function `config_init_local ': Config.c 

> .text + 0x138): undefined reference to `asprintf ' 

> ../src/easycwmpd-easycwmp.o: In function `main ': Easycwmp.c .text 

> + 0x237): undefined reference to `fork ' Easycwmp.c .text + 0x2ed): undefined reference to `asprintf ' Easycwmp.c .text + 0x34a): 

> undefined reference to `closelog ' ../src/easycwmpd-http.o: In 

> function `http_get_response ': Http.c text + 0x4b7): undefined 

> reference to `asprintf ' ../src/easycwmpd-xml.o: In function 

> `xml_mxml_find_node_by_env_type ': Xml.c text + 0x540): undefined 

> reference to `asprintf ' ../src/easycwmpd-xml.o: In function 

> `xml_get_hold_request ': Xml.c text + 0x786): undefined reference 

> to `asprintf ' Xml.c text + 0x81e): undefined reference to 

> `asprintf ' ../src/easycwmpd-xml.o: In function `xml_handle_message ': 

> Xml.c .text + 0x929): undefined reference to `asprintf ' 

> ../src/easycwmpd-xml.o:xml.c.text+0xe26): more undefined references 

> to `asprintf 'follow Collect2: ld returned 1 exit status 

 

 

can you guys, explain to me if i was wrong doing this , or can you give me any guidelines or any help i will appreciate that
0 Kudos
0 Replies
Reply