- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was using a combination of C and Fortran routines, so I use the compiler option -nus. Now when I combined this with theroutine qsort, I got the error:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This can be solved by calling qsort_(...,...,...,...). I.e. adding the underscore yourself.
This can be solved by calling qsort_(...,...,...,...). I.e. adding the underscore yourself.
I guess the compiler has two different variants of qsort available, and with the -nus option it takes the one for C, and without it it takes the one for Fortran?
Sietse
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that without the underscore, you are getting one from the C library which expects C calling conventions. That's the risk you take when you tell the compiler to change the default naming conventions.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page