- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a DLL which compiles fine under SingleTreadedDLL libraries. I have just added a c-wrapper to it for execption handling.
If I have /libdir:noauto I get:
"defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library"
WITHOUT /libdir:noauto I get the same complaint but on LIBCMT.
(presumably a C-multithreaded library?)
The same things happens with: MultiTreadedDLL under the Fortran|Libraries Tab.
I'd appreciate any hints.
Tim
in case it is relevant: The DLL also links in a static CVF library which is ALSO compiled using SingleTreadedDLL. Without the c-wrapper the static library never presented any problems.
If I have /libdir:noauto I get:
"defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library"
WITHOUT /libdir:noauto I get the same complaint but on LIBCMT.
(presumably a C-multithreaded library?)
The same things happens with: MultiTreadedDLL under the Fortran|Libraries Tab.
I'd appreciate any hints.
Tim
in case it is relevant: The DLL also links in a static CVF library which is ALSO compiled using SingleTreadedDLL. Without the c-wrapper the static library never presented any problems.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The warning goes away when I set the Runtime Library under the project's C-tab to MultiThreaded DLL.
Prior to this, I had thought to set the C-libraries to conform to the fortran libraries, but the fact the C-tab did not have the parallel "Libraries" as the FOtran Tab threw me off before.
Now the problem is I do not know what should be set for the fortran libraries. There are FOUR choices, all of which compile:
Fortran Library: MultiThreadDLL vs SingleThreadDLL
Fortran: /libdir:auto vs /libdir:noauto
I cannot decide what the appropriate settings are because:
I figure due to the fact the the C-libs are MultiThread so should the F90 libs, but will that cause speed degradations or other overhead?
And I truly still do not understand the /libdir option.
In the end ,I will be happy if someone can declare what the right settings should be.
thanks, Tim
Prior to this, I had thought to set the C-libraries to conform to the fortran libraries, but the fact the C-tab did not have the parallel "Libraries" as the FOtran Tab threw me off before.
Now the problem is I do not know what should be set for the fortran libraries. There are FOUR choices, all of which compile:
Fortran Library: MultiThreadDLL vs SingleThreadDLL
Fortran: /libdir:auto vs /libdir:noauto
I cannot decide what the appropriate settings are because:
I figure due to the fact the the C-libs are MultiThread so should the F90 libs, but will that cause speed degradations or other overhead?
And I truly still do not understand the /libdir option.
In the end ,I will be happy if someone can declare what the right settings should be.
thanks, Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read the article on MCLS in the CVF newsletter issue 10. It explains this better than I could.
/libdir means "library directives". The compiler inserts linker directives in the object modules to pull in appropriate Fortran libraries, depending on the /libs setting you use. /libdir:noauto says to ignore these "automatic" library directives.
Steve
/libdir means "library directives". The compiler inserts linker directives in the object modules to pull in appropriate Fortran libraries, depending on the /libs setting you use. /libdir:noauto says to ignore these "automatic" library directives.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve,
I realize the notion od inserting directives, but what the docs do not explain is what are the consequences of each setup?
Under what circumstance would one NOT want the compiler insert the necessary directives in the Obj file?
If one does select /libdir:noauto how else will the program find the libraries it needs?
If all this applies to OBJ files does the /libdir have any consequence for a LIB, DLL, or EXE project?
I hope to see the answers in the article you point to, if I can find it.
FINALLY, any ideas on how to select MultThread vs SingleThread in this situation?
Tim
I realize the notion od inserting directives, but what the docs do not explain is what are the consequences of each setup?
Under what circumstance would one NOT want the compiler insert the necessary directives in the Obj file?
If one does select /libdir:noauto how else will the program find the libraries it needs?
If all this applies to OBJ files does the /libdir have any consequence for a LIB, DLL, or EXE project?
I hope to see the answers in the article you point to, if I can find it.
FINALLY, any ideas on how to select MultThread vs SingleThread in this situation?
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would not want the compiler to insert the directives if you were creating a static library to be used by others. Then you wouldn't have to build different variants of the library for the different library combinations.
Note that for C, you might have to do this, because choosing the threaded libraries actually changes the compiled code. Not for CVF.
It is true that MSVC does not have all of CVF's combinations. But you want to select a combo that matches.
Steve
Note that for C, you might have to do this, because choosing the threaded libraries actually changes the compiled code. Not for CVF.
It is true that MSVC does not have all of CVF's combinations. But you want to select a combo that matches.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
One more question:
Howzitdat msc aingot no SingleThread DLL option?
Tim
One more question:
Howzitdat msc aingot no SingleThread DLL option?
Tim
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