Software Archive
Read-only legacy content
17060 Discussions

using opengl wi the f90gl libraries

Intel_C_Intel
Employee
267 Views
Hi,

I have developed a structural analysis program and now i want to add some features like 3d modeling to see the deflections of the structure and diagrams, etc.

to do this i decided to use glut so i downloaded the f90gl source and binaries, and to try it out i added a subroutine to a program i already have and it worked fine but when i try to use the same code in my structural analysis program it gives me the following:

Linking...
dfor.lib(for_m_qqs.obj) : error LNK2001: unresolved external symbol _errno
dfor.lib(for_portlib.obj) : error LNK2001: unresolved external symbol _errno
Debug/RIGIDEZ.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

RIGIDEZ.exe - 3 error(s), 5 warning(s)

-----

The warnings are about variables not used.
Also I added the switch /nodefaultlib:"libc.lib" for the link since i believe it conflicts with libcmt.lib (?)

i hope someone can help me find a solution

thanks,

Len
0 Kudos
3 Replies
Steven_L_Intel1
Employee
267 Views
Do not use /nodefaultlib - it is almost always the wrong remedy for Multiple C Library Syndrome". If you have references to both libc and libcmt, then you will need to rebuild everything using a consistent setting for whether or not the multithread libraries are being used.

Taking a quick look, I think that the precompiled f90GL libraries we provide as a courtesy are built with the non-threaded libraries. Do you have something being built threaded?

Steve
0 Kudos
Intel_C_Intel
Employee
267 Views
thanks Steve,

i've been looking into my project settings and on the category "Code Generation" under the C/C++ tab the run-time library is set as "Single Threaded".
Also under the Fortran tab the "Use Multi-threaded Libraries" is unchecked

So i don't think i've built anything threaded.

I will take out he "/nodefaultlib" switch and try to set my project multi-threaded to see if this works also you think it would be good to build the f90gl libraries multi-threaded?

Well, i'll try it out and read about threads on the help. I'll post the results later.

Thanks, if you can give me any further advised i would appreciate it!

Len
0 Kudos
Intel_C_Intel
Employee
267 Views
it worked!

now i built everything with multi-threaded libraries and it linked it ok, no errors.

thanks
0 Kudos
Reply