| Thread Tools | Search this thread |
|---|
gregfi04
| June 22, 2009 3:19 PM PDT linking against a "dummy" shared library | ||||
My codebase is split up into groups of subroutines that offer separate functionality, but ultimately make use of the same data set. I'd like to be able to compile each group of subroutines into a shared library, and then have the ability to customize the distribution on a per-user group basis. My thought is to compile a set of "dummy" libraries to satisfy the executable at runtime and gracefully exit the program. Is there any reason why this shouldn't work? Here's an example of the code I'm using for the dummy library: --- subroutine subroutine1 USE MODULE1 USE MODULE2 implicit none write(*,*) 'ERROR: THIS MODULE IS NOT PRESENT' write(*,*) 'IN THIS DISTRIBUTION OF THE CODE.' stop end subroutine subroutine1 --- I'm compiling the shared library with the following command: ifort -g -O0 -CB -fpic -shared -i-static -module ../../build -o libdummy.so dummy.f90 However, when I try to run the executable (after properly setting $LD_LIBRARY_PATH), I get the following: ./code: symbol lookup error: ./code: undefined symbol: for_concat Thoughts? Thanks, Greg | |||||
|
|||||||||||||
|
|||||||||||||
| 8285 users have contributed to 31229 threads and 99107 posts to date. |
|---|
| In the past 24 hours, we have 7 new thread(s) 35 new posts(s), and 47 new user(s). In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing... Escalated as Please welcome our newest member tvinni |