- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to set up a project that can create both 32 & 64 bit versions ofan application. The application has tolinkseveral static libraries and in the 32 bit version these were explicitly added to the project. However if I want to switch to 64 bit configuration I would have to change the libaries to 64 bit versions. I thought that I could get round this by specifying the directories of the appropriate libraries in the Linker Additional Library Directories option in the IDE, and removing the .lib files from the project. This did not work however.Do I have to tell the linkerthe names of the libraries somewhere?
Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve. That worked.
I have noticed that where I had mixed language libraries that were converted to two components, (one fortran and one C) the settings for the output for the C routines does not change to x64Debug when you change configuration and the 32 bit files are overwrittenin the Debug directory. I got round this by changing the settings by hand. Is this something that could be fixed in the conversion routine or is it because it is a Microsoft issue?
I now get lots of unresolved externals when trying to link the x64.Do I need to changethe calling conventions for strings for x64 configurations?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I have seen is that sometimes, and I can't explain why, when I create an x64 configuration for a multi-project solution, only some of the projects get their platform changed. I end up going into Configuration Manager and setting each project to the proper target.
There is only one calling convention for x64. If you have code that assumes STDCALL, or assumes a leading underscore, then that will need to be adjusted as x64 has neither of those. The DECORATE attribute in !DEC$ ATTRIBUTES handles this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I have seen is that sometimes, and I can't explain why, when I create an x64 configuration for a multi-project solution, only some of the projects get their platform changed. I end up going into Configuration Manager and setting each project to the proper target.
There is only one calling convention for x64. If you have code that assumes STDCALL, or assumes a leading underscore, then that will need to be adjusted as x64 has neither of those. The DECORATE attribute in !DEC$ ATTRIBUTES handles this.
Steve, regarding the second part of the above thread, I have the same settings as those in the 32-bit version. It looks as though all calls involving a string argument are being listed. These are fortran calling fortran. Do I need to change the settings for string arguments for 64-bit conventions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - the string length passing is the same. Of course, 64-bit lengths are passed so if you are calling C routines that expect a length, they should be declared size_t or something like that rather than int.
What do you mean by "being listed"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - the string length passing is the same. Of course, 64-bit lengths are passed so if you are calling C routines that expect a length, they should be declared size_t or something like that rather than int.
What do you mean by "being listed"?
Steve, I meant that all references to subroutines with string arguments were listed as being unresloved externals. These are fortran files within the same solution although in different projects. The solution compiles and links fine in the 32 bit configuration. I use the same solution for both configuations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't think of why that should be, as there's no argument list length indicator on x64. Can you show an example of the error message with an unresolved symbol? My guess is that there's something else going on here. Of course, if you can provide a small but complete example that shows the problem, that would be best.

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