Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > Embedded > Add static libr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 12429 of 13381
Post > Topic >>

Add static library with the Ecos Executable

by Me On Line <jawadsmail@[EMAIL PROTECTED] > Jun 26, 2008 at 12:05 AM

Hi there,

I have a problem in to add a static library with an application
executable for eCos. Actually I have two projects and have made three
cmake files for both the project. One is to include the sub folders
for the projects and second  is for the project to create a static
library by using cmake add_library statement and third cmake file is
for the other project to build the executable for the eCos where I am
link the the static library but I got the following errors;

Linking CXX executable helloDemo.elf
CMakeFiles/helloDemo.dir/demo.o: In function `main':
CMakeFiles/helloDemo.dir/demo.o(.text+0x19): undefined reference to
`Hello::Print()'
collect2: ld returned 1 exit status
make[2]: *** [Demo/helloDemo.elf] Error 1
make[1]: *** [Demo/CMakeFiles/helloDemo.dir/all] Error 2
make: *** [all] Error 2


I think the eCos =93USEECOS=94 include does not sup****t the add_library
statement. Is  there any way to create a static libray for the eCos
executable or some thing like add_library .

Following are the list files.

1)	CMakeList.txt in the root folder which include sub folders for the
build.

project (HELLO)
add_subdirectory (Hello)
add_subdirectory (Demo)

2). CMakeList.txt in the hello project to build a static library.
add_library (Hello hello.cxx)

3.  CMakeList.txt in the demo project to build an eCos executable .
 include(UseEcos)
include_directories (${HELLO_SOURCE_DIR}/Hello)
link_directories (${HELLO_BINARY_DIR}/Hello)
ECOS_ADJUST_DIRECTORY(target_SRCS ${SRC_LIST})
ECOS_ADD_INCLUDE_DIRECTORIES()
ECOS_USE_I386_ELF_TOOLS()
ECOS_ADD_EXECUTABLE(helloDemo demo.cxx demo_b.cxx)
target_link_libraries (helloDemo Hello)

Please provide some advise, it would really be appreciated.

Regards.
 




 1 Posts in Topic:
Add static library with the Ecos Executable
Me On Line <jawadsmail  2008-06-26 00:05:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 17:19:44 CST 2008.