Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Trouble Linking

scrognoid
Beginner
560 Views

I am evaluating the latest Intel Fortran Compiler in the VS 2005 IDE. I'm having trouble linking to several sources. I'll start with what I think might be the easiest.

I successfully built compat.lib. I can't link to routine. I tried Project>Properties>Linker>Input>Additional Dependencies. I put in the entire path.

Error 9 error LNK2001: unresolved external symbol _CM_MSLEEP sleep_and_check.obj

Apparently I should be able to specify a project dependency. I tried right-click Solution 'fft_auto'>Project Dependencies. There is a Depends On box, but I can't enter anything into it.

0 Kudos
1 Solution
sarma_amras
New Contributor I
560 Views
Quoting - scrognoid

I am evaluating the latest Intel Fortran Compiler in the VS 2005 IDE. I'm having trouble linking to several sources. I'll start with what I think might be the easiest.

I successfully built compat.lib. I can't link to routine. I tried Project>Properties>Linker>Input>Additional Dependencies. I put in the entire path.

Error 9 error LNK2001: unresolved external symbol _CM_MSLEEP sleep_and_check.obj

Apparently I should be able to specify a project dependency. I tried right-click Solution 'fft_auto'>Project Dependencies. There is a Depends On box, but I can't enter anything into it.

Hi,

May I know how are you creating the projects.

Under the same solution or as separate solutions.

My suggestion is to create seperate solutions for C & Fortran project and then enter the Additional Dependencies correctly.

It should be simple.

Also make sure that the Naming of the function should be matching. i.e. either Caps or small in both C & Fortran.

Else you need to make the changes to the Calling naming convention under Fortran->External Procedures to lowercase if your C function is in lowercase.

Hope this will rectify the err.

View solution in original post

0 Kudos
3 Replies
sarma_amras
New Contributor I
561 Views
Quoting - scrognoid

I am evaluating the latest Intel Fortran Compiler in the VS 2005 IDE. I'm having trouble linking to several sources. I'll start with what I think might be the easiest.

I successfully built compat.lib. I can't link to routine. I tried Project>Properties>Linker>Input>Additional Dependencies. I put in the entire path.

Error 9 error LNK2001: unresolved external symbol _CM_MSLEEP sleep_and_check.obj

Apparently I should be able to specify a project dependency. I tried right-click Solution 'fft_auto'>Project Dependencies. There is a Depends On box, but I can't enter anything into it.

Hi,

May I know how are you creating the projects.

Under the same solution or as separate solutions.

My suggestion is to create seperate solutions for C & Fortran project and then enter the Additional Dependencies correctly.

It should be simple.

Also make sure that the Naming of the function should be matching. i.e. either Caps or small in both C & Fortran.

Else you need to make the changes to the Calling naming convention under Fortran->External Procedures to lowercase if your C function is in lowercase.

Hope this will rectify the err.

0 Kudos
Jugoslav_Dujic
Valued Contributor II
560 Views
Quoting - sarma_amras

Under the same solution or as separate solutions.

My suggestion is to create seperate solutions for C & Fortran project and then enter the Additional Dependencies correctly.

You meant "projects" rather than "solution", because a solution is a collection of projects.

0 Kudos
scrognoid
Beginner
560 Views
Quoting - sarma_amras

Hi,

May I know how are you creating the projects.

Under the same solution or as separate solutions.

My suggestion is to create seperate solutions for C & Fortran project and then enter the Additional Dependencies correctly.

It should be simple.

Also make sure that the Naming of the function should be matching. i.e. either Caps or small in both C & Fortran.

Else you need to make the changes to the Calling naming convention under Fortran->External Procedures to lowercase if your C function is in lowercase.

Hope this will rectify the err.

Thanks for the help. I have worked through many issues, and separating C and Fortran into separate projects was part of it. The C routines I was trying to link never made it into the library.

0 Kudos
Reply